DocumentCode :
3587361
Title :
BP-Miner: Mining Paired Functions from the Binary Code of Drivers for Error Handling
Author :
Hu-Qiu Liu ; Jia-Ju Bai ; Yu-Ping Wang ; Shi-Min Hu
Author_Institution :
Tsinghua Nat. Lab. for Inf. Sci. & Technol. Comput. Sci. & Technol., Tsinghua Univ., Beijing, China
Volume :
1
fYear :
2014
Firstpage :
415
Lastpage :
422
Abstract :
Kernel extension functions are provided as interfaces for drivers to manage devices and resources, and there are many implicit rules about their usages. One of the most important rules is that many functions should be called in pairs. That is to say, when an error occurs in a function, the driver should call related functions to handle it and release the acquired resources before returning, and we name these functions between normal execution paths and error handling paths as paired functions. However, many developers are unaware of them, which causes lots of bugs. Therefore, it is highly significant to automatically extract paired functions and detect violations for drivers. This paper proposes an efficient tool named BP-Miner, which can extract paired functions from binary code of driver modules and detect violations for error handling in drivers with extracted paired functions. BP-Miner constructs control flow graph (CFG) based on basic blocks of binary code, and locates potential execution paths to extract paired functions. We have evaluated BP-Miner with Linux drivers 2.6.38 and 3.13.0-rc7. 76 bugs are reported by BP-Miner in 2.6.38 which have been fixed in the current latest version 3.13.0-rc7. BP-Miner spends about 90 minutes handling 3653 module files for 3.13.0-rc7, and 859 violations have been detected with 1167 extracted paired functions. As it works on the binary code, it can be utilized to check close-source drivers.
Keywords :
Linux; data mining; BP-miner; CFG; Linux drivers; binary code; close source drivers; control flow graph; driver modules; error handling; kernel extension functions; mining paired functions; Assembly; Binary codes; Computer bugs; Kernel; Linux; Registers; Paired functions mining; binary code checking; error path checking; violations detection;
fLanguage :
English
Publisher :
ieee
Conference_Titel :
Software Engineering Conference (APSEC), 2014 21st Asia-Pacific
ISSN :
1530-1362
Print_ISBN :
978-1-4799-7425-2
Type :
conf
DOI :
10.1109/APSEC.2014.67
Filename :
7091338
Link To Document :
بازگشت