Developer Tools

TEERepair: LLMs and DSL auto-fix TEE partitioning bugs at 87.6% success

A new framework merges domain-specific languages and LLMs to patch security flaws in trusted execution environments...

Deep Dive

TEERepair addresses a critical gap in TEE security: automated repair of improper partitioning between trusted and untrusted OS components. The framework first defines a DSL to encode common TEE security patterns as patch templates with placeholders. Then, an LLM (likely a large language model similar to GPT-4 or Codex) analyzes the low-level C code semantics and fills those placeholders to create context-aware fixes. Finally, TEERepair automatically generates test clients to validate each repair.

Evaluated on the TEE Partitioning Errors Benchmark (PartitioningE-Bench), TEERepair achieved a repair success rate of 87.6%, significantly higher than any existing automated repair tool. The researchers also applied it to real-world TEE projects, submitting 5 pull requests; 2 have already been confirmed and merged by maintainers. This work, accepted at FSE 2026, demonstrates a practical path from vulnerability detection to fix generation in a domain where manual repair is tedious and error-prone.

Key Points
  • 87.6% repair success rate on the PartitioningE-Bench benchmark, far exceeding all baselines.
  • Combines a domain-specific language (DSL) for security patterns with LLM-based code reasoning.
  • Submitted 5 pull requests to real TEE projects; 2 have already been merged by maintainers.

Why It Matters

Automated TEE repair closes a security gap for hardware-isolated applications, reducing manual effort and preventing data leaks.