[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
10.1145/3658644.3690376acmconferencesArticle/Chapter ViewAbstractPublication PagesccsConference Proceedingsconference-collections
research-article
Free access

CrossFire: Fuzzing macOS Cross-XPU Memory on Apple Silicon

Published: 09 December 2024 Publication History

Abstract

Modern computing systems increasingly utilize XPUs, such as GPUs and NPUs, for specialized computation tasks. While these XPUs provide critical functionalities, their security protections are generally weaker than those of CPUs, making them attractive attack targets. In particular, Apple silicon optimizes memory usage by adopting a unified memory architecture (UMA), which employs shared memory regions (termed cross-XPU memory) to facilitate communication between CPUs and XPUs. Although the cross-XPU memory enhances performance, it also introduces a new attack surface. Unfortunately, the difficulty in identifying effective shared memory regions and generating valid payloads makes fuzzing cross-XPU memory a challenging problem that cannot be resolved effectively by existing fuzzing techniques.
Therefore, we propose CrossFire, the first fuzzer targeting Apple silicon XPU by fuzzing cross-XPU memory, to evaluate this new attack surface. Initially, we conduct an in-depth cross-XPU memory analysis to investigate the challenges of fuzzing XPU. To address these challenges, CrossFire introduces two novel techniques to pinpoint effective fuzzing regions in cross-XPU memory and trace kernel execution information to extract data constraints. Leveraging these techniques, we develop CrossFire based on the m1n1 hypervisor to monitor cross-XPU memory accesses and perform grey-box hooking-based fuzzing. We further evaluate CrossFire on macOS Ventura, where it has identified 15 new zero-day bugs, 8 of which have been confirmed by Apple.

References

[1]
Akihiko Odaki. 2022. Introduce gdbserver. https://github.com/AsahiLinux/m1n1/pull/194/commits/cc420003ef9c929ca64b68723a38234b567395b7.
[2]
Apple. 2020. Choosing a Resource Storage Mode for Apple GPUs. https://developer.apple.com/documentation/metal/resource_fundamentals/choosing_a_resource_storage_mode_for_apple_gpus?language=objc.
[3]
Apple. 2024. Accelerate graphics and much more with Metal. https://developer.apple.com/metal/.
[4]
Apple. 2024. Build virtualization solutions on top of a lightweight hypervisor, without third-party kernel extensions. https://developer.apple.com/documentation/hypervisor.
[5]
Apple. 2024. Page Protection Layer. https://support.apple.com/en-hk/guide/security/sec8b776536b/1/web/1#sec314c3af61.
[6]
Apple. 2024 d. System Coprocessor Integrity Protection. https://support.apple.com/en-hk/guide/security/sec8b776536b/1/web/1##sec59f75f8cd.
[7]
ARM. 2024. Virtualization-host-extensions. https://developer.arm.com/documentation/102142/0100/Virtualization-host-extensions.
[8]
ARM LTD. [n.,d.]. Memory access atomicity. https://developer.arm.com/documentation/den0024/a/The-A64-instruction-set/Memory-access-instructions/Memory-access-atomicity.
[9]
ARM LTD. 2020. Arm Architecture Reference Manual for A-profile architecture. https://developer.arm.com/documentation/ddi0487/latest.
[10]
AsahiLinux. 2021. m1n1: an experimentation playground for Apple Silicon. https://github.com/AsahiLinux/m1n1.
[11]
Ian Beer. 2023. Abusing iPhone Co-Processors for Privilege Escalation. In (Objective By The Sea (OBTS) v5.0).
[12]
Zechao Cai, Jiaxun Zhu, Wenbo Shen, Yutian Yang, Rui Chang, Yu Wang, Jinku Li, and Kui Ren. 2023. Demystifying Pointer Authentication on Apple M1. In 32nd USENIX Security Symposium (USENIX Security 23). 2833--2848.
[13]
Weiteng Chen, Yu Wang, Zheng Zhang, and Zhiyun Qian. 2021. Syzgen: Automated generation of syscall specification of closed-source macos drivers. In Proceedings of the 2021 ACM SIGSAC Conference on Computer and Communications Security. 749--763.
[14]
Jaeseung Choi, Kangsu Kim, Daejin Lee, and Sang Kil Cha. 2021. NTFuzz: Enabling type-aware kernel fuzzing on windows with static binary analysis. In 2021 IEEE Symposium on Security and Privacy (SP). IEEE, 677--693.
[15]
Parallels® Desktop. 2024. Parallels® Desktop 19 for Mac. https://www.parallels.cn/products/desktop/.
[16]
Alastair F Donaldson, Hugues Evrard, Andrei Lascu, and Paul Thomson. 2017. Automated testing of graphics shader compilers. Proceedings of the ACM on Programming Languages, Vol. 1, OOPSLA (2017), 1--29.
[17]
Thierry Doré. 2022. A journey of fuzzing Nvidia graphic driver leading to LPE exploitation. In (Hexacon).
[18]
Hugues Evrard and Paul Thomson. 2017. GraphicsFuzz. https://github.com/google/graphicsfuzz.
[19]
Hugues Evrard and Paul Thomson. 2017. GraphicsFuzz: Secure and Robust Graphics Rendering. https://www.khronos.org/assets/uploads/developers/library/2017-gdc-webgl-webvr-gltf-meetup/10 - Imperial College London - GraphicsFuzz_Mar17.pdf.
[20]
Lars Fröder. 2024. How to Jailbreak iOS 16. In (Power of Community).
[21]
Haifisch. 2016. kuzz: an iOS IOKit fuzzer. https://github.com/Haifisch/kuzz
[22]
HyungSeok Han and Sang Kil Cha. 2017. Imf: Inferred model-based fuzzer. In Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security. 2345--2358.
[23]
Apple Inc. 2020. Apple unleashes M1. https://www.apple.com/newsroom/2020/11/apple-unleashes-m1.
[24]
Kaspersky. 2023. Operation Triangulation: The last (hardware) mystery. https://securelist.com/operation-triangulation-the-last-hardware-mystery/111669/.
[25]
Moony Li and Jack Tang. 2016. Fuzzing and Exploiting OSX Vulnerabilities for Fun and Profit. In (PacSec). https://papers.put.as/papers/macosx/2016/PSJ2016_MoonyLi_pacsec-1.8.pdf
[26]
Juwei Lin and Junzhi Lu. 2019. PanicXNU 3.0. In Hack In The Box Security Conference (HITB).
[27]
Juwei Lin, Lilang Wu, and Moony Li. 2018. Drill the Apple Core: Fuzz Apple Core Component in Kernel and User Mode for Fun and Profit. In (Blackhat EUROPE). https://i.blackhat.com/eu-18/Wed-Dec-5/eu-18-Juwei_Lin-Drill-The-Apple-Core.pdf
[28]
Asahi Lina. 2023. agx-exploit. https://github.com/asahilina/agx-exploit.
[29]
Google LLC. 2022. Syzkaller: An unsupervised coverage-guided kernel fuzzer. https://github.com/google/syzkaller
[30]
Lei Long and Peng Xiao. 2015. Optimized Fuzzing IOKit in iOS. In (Blackhat USA).
[31]
ARM LTD. 2024. CoreSight Architecture. https://developer.arm.com/Architectures/CoreSight%20Architecture.
[32]
Jianfeng Pan, Guanglu Yan, and Xiaocao Fan. 2017. Digtool: A virtualization-based framework for detecting kernel vulnerabilities. In 26th USENIX Security Symposium (USENIX Security 17). 149--165.
[33]
Zhenpeng Pan. 2022. The Journey To Hybrid Apple Driver Fuzzing. In (Power of Community). https://powerofcommunity.net/poc2022/ZhenpengPan.pdf
[34]
Hui Peng, Zhihao Yao, Ardalan Amiri Sani, Dave Jing Tian, and Mathias Payer. 2023. GLeeFuzz: Fuzzing WebGL Through Error Message Guided Mutation. In 32nd USENIX Security Symposium (USENIX Security 23). 1883--1899.
[35]
Jonathan Salwan. 2015. Triton: a dynamic binary analysis library. https://github.com/JonathanSalwan/Triton.
[36]
Sven Peter. 2021. Apple Silicon Hardware Secrets: SPRR and Guarded Exception Levels (GXF). https://blog.svenpeter.dev/posts/m1_sprr_gxf/.
[37]
Sven Peter. 2021. HW: SPRR and GXF. https://github.com/AsahiLinux/docs/wiki/HW:-SPRR-and-GXF/.
[38]
UTM. 2024. UTM is a full featured system emulator and virtual machine host for iOS and macOS. https://github.com/utmapp/U™.
[39]
Xingkai Wang, Wenbo Shen, Yujie Bu, Jinmeng Zhou, and Yajin Zhou. 2024. DMAAUTH: A Lightweight Pointer Integrity-based Secure Architecture to Defeat DMA Attacks. In 33rd USENIX Security Symposium (USENIX Security 24). USENIX Association, Philadelphia, PA, 1081--1098. https://www.usenix.org/conference/usenixsecurity24/presentation/wang-xingkai
[40]
Yu Wang. 2018. Attacking the macOS Kernel Graphics Driver. In Attacking the macOS Kernel Graphics Driver. https://media.defcon.org/DEF%20CON%2026/DEF%20CON%2026%20presentations/DEFCON-26-Yu-Wang-Attacking-The-MacOS-Kernel-Graphics-Driver-Updated.pdf
[41]
Yu Wang. 2018. Kemon: An Open Source Pre and Post Callback-based Framework for macOS Kernel Monitoring. https://github.com/didi/kemon?tab=readme-ov-file.
[42]
Lilang Wu and Moony Li. 2019. LLDBFuzzer: Debugging and Fuzzing the Apple Kernel. https://www.trendmicro.com/en_us/research/19/h/lldbfuzzer-debugging-and-fuzzing-the-apple-kernel-with-lldb-script.html
[43]
Chen Xiaobo and Xu Hao. 2012. Find Your Own iOS Kernel Bug. In (Power of Community). https://papers.put.as/papers/ios/2012/Xu-Hao-Xiabo-Chen-Find-Your-Own-iOS-Kernel-Bug.pdf
[44]
Tingting Yin, Zicong Gao, Zhenghang Xiao, Zheyu Ma, Min Zheng, and Chao Zhang. 2023. KextFuzz: Fuzzing macOS Kernel EXTensions on Apple Silicon via Exploiting Mitigations. In 32nd USENIX Security Symposium (USENIX Security 23). 5039--5054.
[45]
Ziqi Yuan, Siyu Hong, Rui Chang, Yajin Zhou, Wenbo Shen, and Kui Ren. 2023. Vdom: Fast and unlimited virtual domains on multiple architectures. In Proceedings of the 28th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 2. 905--919.

Index Terms

  1. CrossFire: Fuzzing macOS Cross-XPU Memory on Apple Silicon

    Recommendations

    Comments

    Please enable JavaScript to view thecomments powered by Disqus.

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    CCS '24: Proceedings of the 2024 on ACM SIGSAC Conference on Computer and Communications Security
    December 2024
    5188 pages
    ISBN:9798400706363
    DOI:10.1145/3658644
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

    Sponsors

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 09 December 2024

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. cross-xpu memory
    2. macos
    3. xpu fuzzing

    Qualifiers

    • Research-article

    Funding Sources

    Conference

    CCS '24
    Sponsor:

    Acceptance Rates

    Overall Acceptance Rate 1,261 of 6,999 submissions, 18%

    Upcoming Conference

    CCS '25

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • 0
      Total Citations
    • 131
      Total Downloads
    • Downloads (Last 12 months)131
    • Downloads (Last 6 weeks)131
    Reflects downloads up to 23 Dec 2024

    Other Metrics

    Citations

    View Options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Login options

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media