返回
Understanding and Mitigating Twin Function Misuses in Operating System Kernel
DOI:10.1109/TC.2023.3240365.png)
摘要
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
期刊
IF:
3.8
论文数:
5.3K
被引数:
9.8K
机构
引用论文
Highly specific colorimetric detection based on aggregation of l-cysteine functionalized gold nanoparticles for cypermethrin in water samples
RSC Advances
IF0
A Model of Postural Control in Quiet Standing: Robust Compensation of Delay-Induced Instability Using Intermittent Activation of Feedback Control安静站立的姿势控制模型: 使用反馈控制的间歇性激活对延迟引起的不稳定性进行鲁棒补偿
PLoS ONE
IF0

