TikTag: Breaking ARM's Memory Tagging Extension with Speculative Execution

Juhee Kim,Jinbum Park,Sihyeon Roh,Jaeyoung Chung,Youngjoo Lee,Taesoo Kim,Byoungyoung Lee
2024-06-13
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.
Cryptography and Security
What problem does this paper attempt to address?
The problem that this paper attempts to solve is the security issue of ARM Memory Tagging Extension (MTE) in the face of speculative execution attacks. Specifically, the authors studied whether MTE can provide security guarantees as expected and found that through new TIKTAG gadgets, attackers can exploit speculative execution vulnerabilities to leak MTE tags, thus bypassing the protection mechanism provided by MTE. ### Background and Problem Description of the Paper #### Introduction to MTE ARM Memory Tagging Extension (MTE) is a hardware feature introduced since the ARMv8.5 - A architecture, aiming to detect memory corruption vulnerabilities. MTE assigns a 4 - bit tag to each 16 - byte memory allocation and checks whether the tag in the pointer matches the tag associated with the memory location when accessing the memory. If they match, the access is allowed; otherwise, the CPU will trigger a Tag Check Fault (TCF). #### Speculative Execution Attacks Speculative execution attacks are a class of attacks that utilize the speculative behavior of the CPU to leak sensitive information. For example, Spectre and Meltdown are well - known speculative execution attacks. Attackers can use these vulnerabilities to load data that cannot be accessed during normal execution (such as out - of - bounds access) during speculative execution. If the speculatively loaded data affects the cache state, the attacker can infer the data value by observing the cache state (such as cache hit/miss based on access latency). ### Research Objectives The authors mainly explored the following questions in this paper: - **Security of MTE**: Whether MTE can prevent memory corruption attacks as expected. - **Impact of Speculative Execution Attacks on MTE**: Whether there is a possibility of leaking MTE tags through speculative execution attacks. - **Application in Practical Systems**: How to exploit these vulnerabilities in practical systems (such as Google Chrome and the Linux kernel). ### Main Findings The authors discovered two new TIKTAG gadgets: 1. **TIKTAG - v1**: Leaks MTE tags by exploiting speculative contraction of branch prediction and data prefetching. 2. **TIKTAG - v2**: Leaks MTE tags by exploiting the behavior of store - to - load forwarding. Through experimental verification, the authors showed that these gadgets can leak MTE tags with a success rate of over 95% in less than 4 seconds. This indicates that although MTE has low overhead and high efficiency, its security still has serious hidden dangers under speculative execution attacks. ### Conclusions and Recommendations The authors proposed new defense mechanisms to prevent TIKTAG gadgets from leaking MTE tags, including improvement measures at the hardware and software levels. In addition, they also open - sourced the TIKTAG gadgets to help the community better understand the MTE side - channel problem. In conclusion, this paper reveals the potential security risks of MTE under speculative execution attacks and proposes corresponding defense measures, providing an important reference for the future application and development of MTE technology.