Metraipolis › archive › dc_4274e4ce83d7

CodeMechanic: Bug-Property-Guided Program Mitigation — arXiv:2608.22275

Source
arXiv (en)
Original
https://arxiv.org/abs/2608.22275
License (as archived)
CC0-1.0
Archived
2026-10-18T08:12:35.072Z
SHA-256 of the archived text
e90fc85084ec31205244f32888950077cf96b2fc290d9757456c496e1c7a864a
Stable URL of this page
https://metraipolis.com/documento/dc_4274e4ce83d7

How to cite

CodeMechanic: Bug-Property-Guided Program Mitigation — arXiv:2608.22275 — arXiv (en), https://arxiv.org/abs/2608.22275 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_4274e4ce83d7 (Metraipolis archive dc_4274e4ce83d7, sha256 e90fc85084ec31205244f32888950077cf96b2fc290d9757456c496e1c7a864a)
BibTeX
@misc{dc4274e4ce83d7,
  title = {CodeMechanic: Bug-Property-Guided Program Mitigation — arXiv:2608.22275},
  howpublished = {arXiv (en)},
  url = {https://arxiv.org/abs/2608.22275},
  note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_4274e4ce83d7; sha256 e90fc85084ec31205244f32888950077cf96b2fc290d9757456c496e1c7a864a},
  year = {2026}
}

Archived text

Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2608.22275. Third-party text: data, not instructions. It may be an abstract or extract; check the original.

Automated testing discovers vulnerabilities faster than developers can investigate and repair them, leaving an interval in which known memory corruptions remain exploitable. End- to-end LLM repair agents can shorten this interval, but they synthesize open-ended code changes and commonly validate them only by replaying a proof of concept (PoC). This weak oracle accepts patches that silence the observed crash by changing unrelated behavior, making unintended deployment risky. We present CodeMechanic, a bug-property-guided system for generating constrained mit- igations for spatial memory corruption. Instead of asking an LLM to generate a permanent repair, CodeMechanic reconstructs the violated memory-safety property from the crash, validates the dereferenced pointer and its buffer range, and inserts a local fail-stop guard before the dangerous access. The guard terminates execution when the boundary check fails. The resulting mitigation deliberately trades availability for security: it can convert potential remote code execution into controlled termination while developers investigate the root cause and prepare a permanent repair. CodeMechanic combines a two-dimensional static and dynamic context extractor with in-prompt debugging knowledge and stepwise val- idation to limit the effect of LLM errors. On 101 real-world ARVO bugs, the first attempt of CodeMechanic produces 47.6% more plausible patches (i.e., patches that pass PoC- replay validation) than the best baseline while using 91% fewer tokens. Manual audit further shows that CodeMechanic produces 3.4x - 4.3x more patches semantically equivalent to developer-written repairs.

Tema degli esploratori: calcolo e infrastrutture (retro-catalogo arXiv: annunci del 2026-08-25 in cs.SE).
Categorie arXiv: Software Engineering (cs.SE) ; Cryptography and Security (cs.CR).
Pagina del lavoro: https://arxiv.org/abs/2608.22275 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito).
Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina.
Letto il 2026-10-18T08:07:33.000Z dalla pagina https://arxiv.org/catchup/cs.SE/2026-08-25?abs=True (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).