Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
144 tokens/sec
GPT-4o
7 tokens/sec
Gemini 2.5 Pro Pro
45 tokens/sec
o3 Pro
4 tokens/sec
GPT-4.1 Pro
38 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

TikTag: Breaking ARM's Memory Tagging Extension with Speculative Execution (2406.08719v1)

Published 13 Jun 2024 in cs.CR

Abstract: ARM Memory Tagging Extension (MTE) is a new hardware feature introduced in ARMv8.5-A architecture, aiming to detect memory corruption vulnerabilities. The low overhead of MTE makes it an attractive solution to mitigate memory corruption attacks in modern software systems and is considered the most promising path forward for improving C/C++ software security. This paper explores the potential security risks posed by speculative execution attacks against MTE. Specifically, this paper identifies new TikTag gadgets capable of leaking the MTE tags from arbitrary memory addresses through speculative execution. With TikTag gadgets, attackers can bypass the probabilistic defense of MTE, increasing the attack success rate by close to 100%. We demonstrate that TikTag gadgets can be used to bypass MTE-based mitigations in real-world systems, Google Chrome and the Linux kernel. Experimental results show that TikTag gadgets can successfully leak an MTE tag with a success rate higher than 95% in less than 4 seconds. We further propose new defense mechanisms to mitigate the security risks posed by TikTag gadgets.

Citations (2)

Summary

  • The paper demonstrates speculative execution gadgets TIKTAG-v1 and TIKTAG-v2 that breach ARM’s MTE by leaking memory tags via branch prediction and store-to-load forwarding.
  • The study used manual code reviews and fuzzing on ARMv8.5-A hardware, achieving nearly 100% success in exploiting tag leakage vulnerabilities.
  • The findings expose practical vulnerabilities in Google Chrome and the Linux kernel, highlighting the need for enhanced CPU and software defenses.

Breaking ARM’s Memory Tagging Extension with Speculative Execution: An Expert Overview

Abstract: The paper "Breaking ARM’s Memory Tagging Extension with Speculative Execution" by Juhee Kim et al. presents a detailed investigation into the vulnerabilities of ARM's Memory Tagging Extension (MTE) when subjected to speculative execution attacks. This paper highlights the discovery of new speculative execution gadgets, named TIKTAG-v1 and TIKTAG-v2, which effectively bypass MTE-based defenses by leaking memory tags. The practicality and implications of these findings were demonstrated through real-world systems like Google Chrome and the Linux kernel.

Introduction: Memory corruption vulnerabilities remain a significant threat to modern computing systems, particularly in languages like C/C++. The ARMv8.5-A architecture introduced MTE as a means to detect and mitigate memory corruption attacks by tagging memory and performing tag checks during memory access. Despite MTE's potential, its interactions with speculative execution—a CPU performance enhancement technique—pose new security risks. This paper scrutinizes these speculative execution-induced vulnerabilities.

Contributions and Findings:

  1. Discovery of Speculative Execution Gadgets:
    • TIKTAG-v1: This gadget exploits the interaction between speculative execution paths and data prefetchers by leveraging the shrinkage of branch prediction. It successfully leaks MTE tags through a sequence of dependent load instructions.
    • TIKTAG-v2: Exploits store-to-load forwarding by manipulating the behavior when a speculative store operation is followed by a load operation within a tight instruction window, allowing for tag leakage if the tags match.
  2. Real-world Implications:
    • Google Chrome: The researchers constructed speculative execution gadgets in the V8 JavaScript engine to leak tags and bypass MTE defenses, demonstrating how attackers can exploit such vulnerabilities in web environments.
    • Linux Kernel: By exploiting real-world vulnerabilities, such as buffer overflows and use-after-free, the paper showcases practical attacks that can bypass MTE, enabling privilege escalation from user space to kernel space.

Methodology:

The paper utilized a combination of manual code reviews and fuzzing techniques to uncover these speculative execution gadgets. The researchers validated their findings on ARMv8.5-A hardware, particularly leveraging the Google Pixel 8 devices, which include both Cortex-X3 and Cortex-A715 cores.

Experimental Results:

  • Effectiveness of Gadgets:
    • TIKTAG-v1 achieved nearly 100% success in leaking MTE tags in under 4 seconds with core-specific nuances in behavior related to speculative execution and data prefetching.
    • TIKTAG-v2 demonstrated significant tag leakage capabilities by exploiting store-to-load forwarding within a CPU dispatch window of five instructions.
  • Performance in Real-world Systems:
    • Attack success rates in Google Chrome were over 95%, with precise tag leakage achieved in approximately 2-3 seconds per tag.
    • In the Linux kernel, synthesized MTE bypass attacks demonstrated high success rates with reasonable exploitation times, indicating the feasibility of these techniques in practical scenarios.

Implications and Mitigations:

The paper's findings indicate that while MTE offers robust protection against memory corruption, its security guarantees can be severely compromised by speculative execution attacks. These discoveries underscore the need for enhancements both at the hardware and software levels:

  1. CPU-Level Mitigations:
    • Ensure speculative execution and data prefetching behaviors remain unaffected by tag check faults.
    • Reconsider store-to-load forwarding policies to mitigate vulnerabilities as demonstrated by TIKTAG-v2.
  2. Software-Level Mitigations:
    • Employ speculation barriers around critical memory operations to prevent speculative leaks.
    • Refine memory allocator designs to account for potential speculative execution vulnerabilities.
    • Implement robust code reviews and automated analysis tools to identify and mitigate TIKTAG-like gadgets in the codebase.

Future Directions:

The paper paves the way for future research in both identifying new classes of speculative execution vulnerabilities and developing comprehensive defenses against such attacks. Moreover, the results suggest the need for an industry-wide effort to standardize security practices surrounding speculative execution and memory tagging.

Conclusion:

In breaking new ground on understanding and mitigating speculative execution vulnerabilities in MTE systems, this paper's contributions are crucial for advancing secure computing practices. As industry adoption of memory tagging architectures grows, ongoing vigilance and innovation will be essential to safeguarding against advanced speculative execution attacks.

Youtube Logo Streamline Icon: https://streamlinehq.com