Understanding and Mitigating Twin Function Misuses in Operating System Kernel

被引:1
|
作者
Gu, Jinyu [1 ]
Shi, Jiacheng [1 ]
Su, Haroran [1 ]
Li, Wentai [1 ]
Zang, Binyu [1 ]
Guan, Haibing [1 ]
Chen, Haibo [1 ]
机构
[1] Shanghai Jiao Tong Univ, Shanghai Key Lab Scalable Comp & Syst, Shanghai 200240, Peoples R China
关键词
Kernel API misusing; kernel bug hunting;
D O I
10.1109/TC.2023.3240365
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
Major operating system kernels expose twin functions, which are groups of internal primitives that have mostly common but slightly diverging semantics, to kernel modules and subsystems. They are created to make the basic primitives work well in various scenarios. Unfortunately, though being expected as solutions, twin functions may turn to problem-makers in practice. As we have observed from over 500 patches applied to upstream Linux and FreeBSD, developers choose an improper one from the twins, leaving the kernel with stability and security bugs as well as error-prone code. In this paper, we aim to understand and mitigate the twin function misuse problem. First, we provide an informative discussion on the misuse-fix patches. We find that violating the constraints from calling context, missing the primitives with better performance, lacking the necessary security enhancements, and breaking the kernel coding style are the four major factors that lead to misuse. We then identify the programming rules from the patches and apply them with a static program analysis tool extended from Coccinelle, including callgraph tainting and type-based function pointer resolving. We have 136 patches accepted by the Linux community and fix 320 new misuses in the upstream Linux kernel.
引用
收藏
页码:2181 / 2193
页数:13
相关论文
共 50 条
  • [41] Fire phoenix cluster operating system kernel and its evaluation
    Zhan, Jianfeng
    Sun, Ninghui
    2005 IEEE INTERNATIONAL CONFERENCE ON CLUSTER COMPUTING (CLUSTER), 2006, : 325 - +
  • [42] Running a Java']Java VM Inside an Operating System Kernel
    Okumura, Takashi
    Childers, Bruce
    Mosse, Daniel
    VEE'08: PROCEEDINGS OF THE FOURTH INTERNATIONAL CONFERENCE ON VIRTUAL EXECUTION ENVIRONMENTS, 2008, : 161 - 169
  • [43] MMK - A DISTRIBUTED OPERATING SYSTEM KERNEL WITH INTEGRATED DYNAMIC LOADBALANCING
    BEMMERL, T
    LUDWIG, T
    LECTURE NOTES IN COMPUTER SCIENCE, 1990, 457 : 744 - 755
  • [44] MP 80 - A MICROPROGRAMMED CPU WITH A MICROCODED OPERATING SYSTEM KERNEL
    BUCCI, G
    NERI, G
    COMPUTER, 1981, 14 (10) : 81 - 90
  • [45] A hardware operating system kernel for multi-processor systems
    Park, Sanggyu
    Hong, Do-Sun
    Chae, Soo-Ik
    IEICE ELECTRONICS EXPRESS, 2008, 5 (09) : 296 - 302
  • [46] Real-time operating system kernel for multithreaded processor
    Tanaka, Kiyofumi
    INTERNATIONAL WORKSHOP ON INNOVATIVE ARCHITECTURE FOR FUTURE GENERATION HIGH PERFORMANCE PROCESSORS AND SYSTEMS, 2006, : 91 - 99
  • [47] A DISTRIBUTED OPERATING SYSTEM KERNEL FOR A CLOSELY-COUPLED MULTIPROCESSOR
    VAUGHAN, FA
    MARLIN, CD
    BARTER, CJ
    AUSTRALIAN COMPUTER JOURNAL, 1988, 20 (02): : 58 - 64
  • [48] Using an in-kernel hypervisor to protect the integrity of operating system
    Chen, Zhixian
    Cui, Jun
    Liu, Wei
    Huang, Hao
    Xu, Bin
    ICIC Express Letters, 2014, 8 (08): : 2357 - 2363
  • [50] USING LOTOS FOR SPECIFYING THE CHORUS DISTRIBUTED OPERATING SYSTEM KERNEL
    PECHEUR, C
    COMPUTER COMMUNICATIONS, 1992, 15 (02) : 93 - 102