arrow
返回

Understanding and Mitigating Twin Function Misuses in Operating System Kernel

delete2023-08-01
delete1
PRE
AI
J
Jinyu Gu *
J
Jiacheng Shi
H
Haroran Su
W
Wentai Li
臧
臧斌宇 (Binyu Zang)
H
Haibing Guan
陈
陈海波 (Haibo Chen)
DOI:10.1109/TC.2023.3240365delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
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.
Keyword:
Kernel API misusing
kernel bug hunting

期刊

IEEE Transactions on Computers 封面图
IEEE Transactions on Computers
IF:
3.8
论文数:
5.3K
被引数:
9.8K

机构

S
shanghai jiao tong university
学者数:
15.7W
论文数: 11.7W
被引数: 159
引用论文

引用论文

Compressive Myelopathy Associated With Ectasia of the Vertebral and Spinal Arteries in a Dog
err2011-08-19
err0
errOAAI
errC. C. Bozynski; L. Vasquez; D. P. O’Brien; G. C. Johnson
err分享
err收藏
err分享
err收藏
err分享
err收藏
A bug finder refined by a large set of open-source projects
err2019-08-01
err9
PREAI
errNam, Jaechang; Wang, Song; Xi, Yuan; Tan, Lin
err分享
err收藏
Analyzing a decade of Linux system calls分析十年的Linux系统调用
err2017-10-13
err25
PREAI
errBagherzadeh, Mojtaba; Kahani, Nafiseh; Bezemer, Cor-Paul; Hassan, Ahmed E.; Dingel, Juergen; Cordy, James R.
err分享
err收藏
High-Impact Articles in Hand Surgery
errHAND
IF0
err2012-01-07
err0
errOAAI
errKyle R. Eberlin; Brian I. Labow; Joseph Upton; Amir H. Taghinia
err分享
err收藏
学者 查看更多内容