Since function pointers are closely related to software control flow and they are writable, attackers often take function pointers as the targets. To protect the function pointers, we propose a novel solution called PointerLock. To avoid being tampered with by the attacker, PointerLock restricts the writing operation on the function pointers with the support of access control on the page. PointerLock centralizes the application's function pointers to a few pages, and these pages are only readable by default. Only when the application want to modify the pointer, PointerLock makes the page writable where the function pointer is located in. This reduces the time window of attacking the function pointer. To prevent an attacker from tampering with other function pointers on the same page as function pointers, PointerLock performs the necessary checks on the page before they are used again. The prototype system of PointerLock was built in Fedora 21 with a 3.17.6 kernel. Two system calls are implemented in kernel space, and six interfaces are developed for users in the form of dynamic link libraries in user space. The tests show that PointerLock is capable of preventing the attacker from tampering with the function pointers, and it does not introduced an overheavy performance.
[1]
John Johansen,et al.
PointGuard™: Protecting Pointers from Buffer Overflow Vulnerabilities
,
2003,
USENIX Security Symposium.
[2]
George Varghese,et al.
Hardware and Binary Modification Support for Code Pointer Protection From Buffer Overflow
,
2004,
37th International Symposium on Microarchitecture (MICRO-37'04).
[3]
Daniel C. DuVarney,et al.
Address Obfuscation: An Efficient Approach to Combat a Broad Range of Memory Error Exploits
,
2003,
USENIX Security Symposium.
[4]
George Candea,et al.
Code-pointer integrity
,
2014,
OSDI.
[5]
Mihai Budiu,et al.
Control-flow integrity principles, implementations, and applications
,
2009,
TSEC.
[6]
Roland H. C. Yap,et al.
Stack Bounds Protection with Low Fat Pointers
,
2017,
NDSS.
[7]
Chao Zhang,et al.
Practical Control Flow Integrity and Randomization for Binary Executables
,
2013,
2013 IEEE Symposium on Security and Privacy.