In android_view_InputDevice_create of android_view_InputDevice.cpp, there is a possible way to execute arbitrary code due to a use after free. This could lead to local escalation of privilege with no additional execution privileges needed. User interaction is not needed for exploitation.
No PoCs from references.
- https://github.com/hshivhare67/platform_frameworks_base_AOSP6_r22_CVE-2023-40140
- https://github.com/hshivhare67/platform_frameworks_base_android-4.2.2_r1_CVE-2023-40140
- https://github.com/nomi-sec/PoC-in-GitHub