Applying Fuzz Driver Generation to Native C/C++ Libraries of OEM Android Framework: Obstacles and Solutions
Fuzz driver generation (FDG) is a fundamental technique for fuzzing library software. Existing FDG approaches have been highly successful with open-source libraries. However, in practice, due to the complex nature of OEM Android frameworks (e.g., customized compilation toolchains, extensive codebases, diverse C/C++ language features), it is not straightforward to integrate existing fuzz driver generation tools with OEM Android libraries. To address this challenge, we first systematically summarize the obstacles to applying existing tools (e.g., FuzzGen) to libraries of an OEM Android\footnote{Name is not provided yet, for anonymous concern}, including compatibility, usability, and effectiveness issues. Following this, we developed a new fuzz driver generation tool, namely \tool{}, specifically designed to tackle these obstacles one by one. In our evaluation, we demonstrate the advantages of \tool{} in real-world OEM Android frameworks. \tool{} is compatible with OEM Android and can generate fuzz drivers for all its libraries which are not supported by existing works. The additional analysis of the OEM Android code also enhances its usability within the system. Overall, \tool{} has helped automatically generate 21,457 fuzz drivers. Additionally, through fuzz driver ranking and selection solution, \tool figured out cut off 95% fuzz drivers which are less useful. \tool{} supports sophisticated C/C++ features in code analysis, ensuring effectiveness. Compared to hand-written fuzz drivers, \tool{} could generate and select fuzz drivers providing a 107.92% coverage improvement. Furthermore, they discovered 6 bugs, showcasing the capability of \tool{} to find real-world issues.