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 条
  • [31] The Design and Implementation of Cloud Terminal Operating System Kernel
    Zhang, Fanlong
    Su, Xiaohong
    Sun, Zhigang
    Ma, Peijun
    2012 IEEE FIFTH INTERNATIONAL CONFERENCE ON ADVANCED COMPUTATIONAL INTELLIGENCE (ICACI), 2012, : 79 - 83
  • [32] Understanding and mitigating cascading crises in the global interconnected system
    Pescaroli, Gianluca
    Nones, Michael
    Galbusera, Luca
    Alexander, David
    INTERNATIONAL JOURNAL OF DISASTER RISK REDUCTION, 2018, 30 : 159 - 163
  • [33] WHAT IS THE FUNCTION OF AN OPERATING SYSTEM
    STERN, RH
    IEEE MICRO, 1984, 4 (01) : 80 - 81
  • [34] Granular Twin Support Vector Machines Based on Mixture Kernel Function
    Wei, Xiuxi
    Huang, Huajuan
    ADVANCED INTELLIGENT COMPUTING THEORIES AND APPLICATIONS, ICIC 2015, PT III, 2015, 9227 : 43 - 54
  • [35] Concept, system structure and operating mode of industrial digital twin system
    Li H.
    Wang H.
    Liu G.
    Wang J.
    Steve E.
    Li L.
    Wang X.
    Shuai Z.
    Wen X.
    Nie F.
    Wang X.
    Hao B.
    Jiang W.
    Liu Y.
    Jisuanji Jicheng Zhizao Xitong/Computer Integrated Manufacturing Systems, CIMS, 2021, 27 (12): : 3373 - 3390
  • [36] Twin barrel artillery system function
    A. V. Zibarov
    D. B. Babayev
    A. A. Mironov
    I. J. Komarov
    P. V. Konstantinov
    A. V. Medvedev
    A. N. Karpov
    Journal of Visualization, 2003, 6 (2) : 94 - 94
  • [37] Twin barrel artillery system function
    Zibarov, AV
    Babayev, DB
    Mironov, AA
    Komarov, IJ
    Konstantinov, PV
    Medvedev, AV
    Karpov, AN
    JOURNAL OF VISUALIZATION, 2003, 6 (02) : 94 - 94
  • [38] UNDERSTANDING DEVICE DRIVERS IN OPERATING SYSTEM/2
    MIZELL, AM
    IBM SYSTEMS JOURNAL, 1988, 27 (02) : 170 - 184
  • [39] Development of Fast and Memory-Safe Operating System Kernel
    Komarov, Timofey
    Ivanov, Mikhail
    Chepik, Nadezhda
    Starikovskiy, Andrey
    PROCEEDINGS OF THE 2019 IEEE CONFERENCE OF RUSSIAN YOUNG RESEARCHERS IN ELECTRICAL AND ELECTRONIC ENGINEERING (EICONRUS), 2019, : 1852 - 1856
  • [40] A kernel running in a DSM - Design aspects of a distributed operating system
    Goeckelmann, R
    Schoettner, M
    Frenz, S
    Schulthess, P
    IEEE INTERNATIONAL CONFERENCE ON CLUSTER COMPUTING, PROCEEDINGS, 2003, : 478 - 482