Automated Repair of TEE Partitioning Issues via DSL-Guided and LLM-Assisted Patching

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Ma, Chengyan, Shi, Jieke, Han, Ruidong, Liu, Ye, Li, Feng, Niu, Yuqing, Lo, David
Natura: Preprint
Pubblicazione: 2026
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866916035369631744
author Ma, Chengyan
Shi, Jieke
Han, Ruidong
Liu, Ye
Li, Feng
Niu, Yuqing
Lo, David
author_facet Ma, Chengyan
Shi, Jieke
Han, Ruidong
Liu, Ye
Li, Feng
Niu, Yuqing
Lo, David
contents Trusted Execution Environments (TEEs) provide hardware-based isolation to protect sensitive data and computations from potentially compromised operating systems (OS). However, TEE applications inevitably interact with the untrusted OS through SDK interfaces, and improper partitioning can introduce severe vulnerabilities such as data leakage and code injection. While prior work has proposed static analysis tools to detect such issues, automated repair remains largely unexplored. This problem is particularly challenging due to three TEE-specific factors: the lack of standardized secure development guidelines, the difficulty of extracting semantic information from low-level C code, and the absence of mature testing and validation methods. In this work, we present TEERepair, a framework for automatically repairing bad partitioning issues in TEE applications. Our approach tackles the above challenges by introducing a domain-specific language (DSL) to encode repair rules that express and capture common TEE security patterns, which are instantiated as patch templates with placeholders for context-specific variables. We then leverage large language models (LLMs) to reason about code semantics and synthesize context-aware patches, and further generate test clients to validate the repairs. We evaluate TEERepair on the TEE Partitioning Errors Benchmark (PartitioningE-Bench), achieving a significantly higher repair success rate of 87.6% compared to baselines. Furthermore, applying TEERepair to real-world TEE projects, we submitted 5 repair pull requests, 2 of which have been confirmed and merged by project maintainers.
format Preprint
id arxiv_https___arxiv_org_abs_2605_22087
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Automated Repair of TEE Partitioning Issues via DSL-Guided and LLM-Assisted Patching
Ma, Chengyan
Shi, Jieke
Han, Ruidong
Liu, Ye
Li, Feng
Niu, Yuqing
Lo, David
Software Engineering
Cryptography and Security
Trusted Execution Environments (TEEs) provide hardware-based isolation to protect sensitive data and computations from potentially compromised operating systems (OS). However, TEE applications inevitably interact with the untrusted OS through SDK interfaces, and improper partitioning can introduce severe vulnerabilities such as data leakage and code injection. While prior work has proposed static analysis tools to detect such issues, automated repair remains largely unexplored. This problem is particularly challenging due to three TEE-specific factors: the lack of standardized secure development guidelines, the difficulty of extracting semantic information from low-level C code, and the absence of mature testing and validation methods. In this work, we present TEERepair, a framework for automatically repairing bad partitioning issues in TEE applications. Our approach tackles the above challenges by introducing a domain-specific language (DSL) to encode repair rules that express and capture common TEE security patterns, which are instantiated as patch templates with placeholders for context-specific variables. We then leverage large language models (LLMs) to reason about code semantics and synthesize context-aware patches, and further generate test clients to validate the repairs. We evaluate TEERepair on the TEE Partitioning Errors Benchmark (PartitioningE-Bench), achieving a significantly higher repair success rate of 87.6% compared to baselines. Furthermore, applying TEERepair to real-world TEE projects, we submitted 5 repair pull requests, 2 of which have been confirmed and merged by project maintainers.
title Automated Repair of TEE Partitioning Issues via DSL-Guided and LLM-Assisted Patching
topic Software Engineering
Cryptography and Security
url https://arxiv.org/abs/2605.22087