Android: mitigation bypass - the guard page creation in IOMX can fail

2016.12.03
Credit: laginimaineb
Risk: High
Local: Yes
Remote: No
CWE: CWE-264


CVSS Base Score: 7.6/10
Impact Subscore: 10/10
Exploitability Subscore: 4.9/10
Exploit range: Remote
Attack complexity: High
Authentication: No required
Confidentiality impact: Complete
Integrity impact: Complete
Availability impact: Complete

Android: mitigation bypass - the guard page creation in IOMX can fail CVE-2016-6717 Because of a design bug in IOMX, the user-supplied sizes in the GET_PARAMETER and SET_PARAMETER calls are discarded before calling in to the responsible OMX code-paths (see OMXNodeInstance.{get,set}Parameter). This has led to a variety of overflow-type bugs, including <a href="https://code.google.com/p/android/issues/detail?id=200821" title="" class="" rel="nofollow">https://code.google.com/p/android/issues/detail?id=200821</a>. In order to mitigate these overflows, the buffers allocated for the user are extended by a single page, and that page is made inaccessible by calling: mprotect((char*)params + allocSize - pageSize, pageSize, PROT_NONE); (see <a href="http://androidxref.com/7.0.0_r1/xref/frameworks/av/media/libmedia/IOMX.cpp#778" title="" class="" rel="nofollow">http://androidxref.com/7.0.0_r1/xref/frameworks/av/media/libmedia/IOMX.cpp#778</a>) However, the return value of mprotect here is not checked and the mprotect request may fail in extreme cases (for example, if the kernel is running low on memory). If an attacker manages to cause this condition to occur, the trailing page will remain RW, which could re-introduce the old GET_PARAMETER/SET_PARAMETER bugs (allowing the attacker to overflow into potentially sensitive data). This bug is subject to a 90 day disclosure deadline. If 90 days elapse without a broadly available patch, then the bug report will automatically become visible to the public. Found by: laginimaineb

References:

http://cxsecurity.com/issue/WLB-2016100105
https://code.google.com/p/android/issues/detail?id=200821
http://androidxref.com/7.0.0_r1/xref/frameworks/av/media/libmedia/IOMX.cpp#778


Vote for this issue:
50%
50%


 

Thanks for you vote!


 

Thanks for you comment!
Your message is in quarantine 48 hours.

Comment it here.


(*) - required fields.  
{{ x.nick }} | Date: {{ x.ux * 1000 | date:'yyyy-MM-dd' }} {{ x.ux * 1000 | date:'HH:mm' }} CET+1
{{ x.comment }}

Copyright 2024, cxsecurity.com

 

Back to Top