Journal of Software:2020.31(6):1600-1618

(计算机软件新技术国家重点实验室(南京大学), 江苏 南京 210023;复旦大学 计算机科学技术学院, 上海 200433;上海市数据科学重点实验室(复旦大学), 上海 200433;上海智能电子系统研究所(复旦大学), 上海 200433;School of Computer Science and Engineering, Nanyang Technological University, Singapore)
Detecting and Preventing Dangling Pointers
WANG Yu,GAO Feng-Juan,MA Ke-Xin,SITU Ling-Yun,WANG Lin-Zhang,CHEN Bi-Huan,LIU Yang,ZHAO Jian-Hua,LI Xuan-Dong
(State Key Laboratory for Novel Software Technology (Nanjing University), Nanjing 210023, China;School of Computer Science, Fudan University, Shanghai 200433, China;Shanghai Key Laboratory of Data Science (Fudan University), Shanghai 200433, China;Shanghai Institute of Intelligent Electronics & Systems (Fudan University), Shanghai 200433, China;School of Computer Science and Engineering, Nanyang Technological University, Singapore)
Chart / table
Similar Articles
Article :Browse 491   Download 408
Received:August 08, 2019    Revised:October 23, 2019
> 中文摘要: 随着技术的发展,信息物理融合系统(cyber-physical system,简称CPS)在生活中扮演着越来越重要的角色,例如电力系统、铁路系统.如果CPS遭到攻击,将对现实世界的正常运转造成巨大影响,甚至威胁生命安全.垂悬指针是指向的区域被释放后未被置为空的指针,它是一种会导致攻击的软件缺陷.由垂悬指针导致的use-after-free和double-free漏洞能够执行任意恶意代码.迄今为止,只有少量工作针对垂悬指针进行检测、防御.其中多数都会导致过高的额外运行时开销.提出DangDone用于检测和防御垂悬指针.首先,通过静态分析检测潜在垂悬指针;然后,基于检测到的垂悬指针信息和一系列预定义的指针变换规则,依据指针传播信息变换指针,使得指针及其别名都指向同一个新引入的指针.基于该方法,实现了DangDone的原型工具.基于11个开源项目和SPEC CPU benchmark的实验结果表明:DangDone的静态分析部分只有33%的误报率,指针变换部分只引入了1%左右的额外开销.同时,DangDone成功防护了11个开源项目中的use-after-free和double-free漏洞.实验结果体现了DangDone的高效率及有效性.
Abstract:Due to rapid technology advance, cyber-physical system (CPS) plays increasingly important rules in society, such as power system and railway system. However, if these systems are attacked, it would be a serious problem for the world even threats human lives. Dangling pointers is such kind of software defects and can lead to use-after-free and double-free vulnerabilities, which can be leveraged by attackers. So far, only a few approaches have been proposed to protect against dangling pointers, while most of them suffer from high overhead. This paper study proposes a lightweight approach, named DangDone, to detect dangling pointers dynamically. Built upon the root cause of a dangling pointer, i.e., a pointer and its aliases are not nullified but the memory area they point to is deallocated. DangDone first detects dangling pointers by static analysis and fuzzing. Based on the result, DangDone realizes the detection by inserting an intermediate pointer between the pointers (i.e., a pointer and its aliases) and the memory area they point to. Hence, nullifying the intermediate pointer will nullify the pointer and its aliases, which causes crash when encountering use-after-free or double-free. Experimental results have demonstrated that DangDone introduces negligible runtime overhead (i.e., around 1% on average) on SPEC CPU benchmark and is able to protect 11 real-world use-after-free or double-free vulnerabilities. The evaluation demonstrates the efficiency and effectiveness of DangDone.
文章编号:     中图分类号:TP311    文献标志码:
基金项目:国家重点研发计划(2017YFA0700604);南京大学优秀博士研究生创新能力提升计划B 国家重点研发计划(2017YFA0700604);南京大学优秀博士研究生创新能力提升计划B
Foundation items:National Key R&D Program (2017YFA0700604); Program B for Outstanding PhD Candidate of Nanjing University
Reference text:


WANG Yu,GAO Feng-Juan,MA Ke-Xin,SITU Ling-Yun,WANG Lin-Zhang,CHEN Bi-Huan,LIU Yang,ZHAO Jian-Hua,LI Xuan-Dong.Detecting and Preventing Dangling Pointers.Journal of Software,2020,31(6):1600-1618