KeenLab iOS Jailbreak Internals Userland Read Only Memory can be Dangerous @HackersOnBoard
KeenLab iOS Jailbreak Internals Userland Read Only Memory can be Dangerous  @HackersOnBoard
Uploaded October 2019 | Updated September 2026, 3 days ago
Modern operating systems nowadays implement read-only memory mappings at their CPU architecture level, preventing common security attacks. By mapping memories as read-only, the memory owner process can usually trust the memory content, eleminating unnecessary security considerations such as boundary check, TOCTTOU(Time of check to time of use) issues etc., with the assumption of other processes not being able to mutate read-only shared mappings in their own virtual spaces.

However, the assumption is not always correct. In the past few years, several logical issues were addressed by security community, most of which were caused by operating systems incorrectly allowing to remap the read-only memories as writble without marking them COW(copy-on-write). As a result, the memory content of the owner process is not trustable anymore, yet causing memory corruption problem or even leading to userland privilege escalation. With operating system evolves, such issues are rare though. On the other hand, with stronger and more abundant features provided by peripheral components attached to the mobile device, DMA(direct-memory-access) technology enables the ability for fast data transfer between the host and peripheral devices. DMA leverages IOMMU(Input/Output Memory Management Unit) for memory operations, thus memory protection mechanism provided by CPU MMU is not available during the DMA transfer. In the middle of 2017, Gal Beniamini of Goole Project Zero team utilized DMA to successfully achieve device-to-host attack on both Nexus 6p and iPhone 7. Nevertheless, this new attack model usually only applies for device-to-host attack senario, where a firmware bug is needed to fully control the device. Unfortunately, DMA related interfaces are not exposed to userland applications directly.

With months of research, we found an exception case on iOS device: the Apple Graphics. At MOSEC conference in 2017, we demonstrated jailbreak for iOS 10.3.2 and iOS 11 beta 2, the latest version at that time, on iPhone 6s and iPhone 7. Details of the demonstration have never been published yet.

In this talk, we will introduce the concepts essential to our bugs, which includes:
- Indirect DMA features exposed to iOS userland
- The implementation of IOMMU memory protection
- Notification mechanism between GPU and Apple Graphics driver

The next part will cover two bug details: one in DMA handling with host virtual memory, and another out-of-bound write issue caused by potentially untrusted userland read-only memory.

Lastly we talk about how we combine two flaws across different Apple Graphics components to achieve reliable kernel code execution from iOS application sandbox.

Black Hat USA 2018
KeenLab iOS Jailbreak Internals Userland Read Only Memory can be DangerousBlack Hat USA 2018 - The Unbearable Lightness of BMCsBlack Hat USA 2018 - Black Box is Dead Long Live Black Box!DEF CON 27 - Michael Stepankin - Apache Solr InjectionBlack Hat USA 2018 Mental Health Hacks Fighting Burnout, Depression and Suicide in the Hacker CommunDEF CON 27 - Mike Spicer - I Know What You Did Last Summer 3 Years of Wireless Monitoring at DEF CONDEF CON 27 - Andreas Baumhof - Are Quantum Computers Really A Threat To CryptographyDEF CON 27 - Ben Sadeghipour - Owning The Clout Through Server-Side Request ForgeryDEF CON 27 - Junyu Zhou - Web2Own Attacking Desktop Apps From Web Securitys PerspectiveDEF CON 27 - Marina Simakov - Relaying Credentials Has Never Been EasierDEF CON 27 - Omer Gull - SELECT code execution FROM USING SQLiteDEF CON 27 - Xiaolong Bai - HackPac Hacking Pointer Authentication in iOS User Space
HackersOnBoard |

KeenLab iOS Jailbreak Internals Userland Read Only Memory can be Dangerous

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER