CTS-testIMemoryElevationOfPrivilegeExploit
2017-03-14 11:42
435 查看
android.security.cts.IMemoryHeapCorruptionTest -- testIMemoryElevationOfPrivilegeExploit fail junit.framework.AssertionFailedError: Device is vulnerable to bug #26877992!! For more information, refer - https://android.googlesource.com/platform/frameworks/native/+/f3199c228aced7858b75a8070b8358c155ae0149 at junit.framework.Assert.fail(Assert.java:50)
修改方法:
--- a/idh.code/frameworks/native/libs/binder/IMemory.cpp +++ b/idh.code/frameworks/native/libs/binder/IMemory.cpp @@ -187,15 +187,26 @@ sp<IMemoryHeap> BpMemory::getMemory(ssize_t* offset, size_t* size) const if (heap != 0) { mHeap = interface_cast<IMemoryHeap>(heap); if (mHeap != 0) { - mOffset = o; - mSize = s; + size_t heapSize = mHeap->getSize(); + if (s <= heapSize + && o >= 0 + && (static_cast<size_t>(o) <= heapSize - s)) { + mOffset = o; + mSize = s; + } else { + // Hm. + android_errorWriteWithInfoLog(0x534e4554, + "26877992", -1, NULL, 0); + mOffset = 0; + mSize = 0; + } } } } } if (offset) *offset = mOffset; if (size) *size = mSize; - return mHeap; + return (mSize > 0) ? mHeap : 0; }
相关文章推荐
- MS08-066 Microsoft Ancillary Function Driver Elevation of Privilege exploit
- MS12-032 - Vulnerability in TCP/IP Could Allow Elevation of Privilege
- Elevation of Privilege (EoP) Card Game
- WSS3 Elevation of Privilege 替代 用户身份模拟Impersonate 进行权限提升
- MS12-032 - Vulnerability in TCP/IP Could Allow Elevation of Privilege
- Microsoft Windows CSRSS Local Privilege Escalation Exploit (MS05-018)
- Linux Kernel < 2.6.29 exit_notify() Local Privilege Escalation Exploit
- Microsoft Windows CSRSS Local Privilege Escalation Exploit (MS05-018)
- ERROR 1227 (42000): Access denied; you need (at least one of) the PROCESS privilege(s) for this oper
- vBulletinR Version 3.8.2 Denial of Service Exploit
- Set privilege of folder under Apache of Linux
- FreeBSD 7.0-RELEASE Telnet Daemon Local Privilege Escalation Exploit
- MS Windows GDI Local Privilege Escalation Exploit
- [2000]MS Windows (Jolt2.c) Denial of Service Exploit
- Sendmail <= 8.12.8 prescan() proof of concept BSD exploit
- MS Windows XP/2003 AFD.sys Privilege Escalation Exploit (K-plugin)
- How to debug ASP.Net program without the privilege of administrator
- FreeBSD Intel SYSRET Kernel Privilege Escalation Exploit
- LINUX KERNEL <= 2.6.36-RC8 RDS PRIVILEGE ESCALATION EXPLOIT
- 空间插值文献阅读(Geostatistical approaches for incorporating elevation into the spatial interpolation of rainfall)