Trail of Bits Leverages OpenAI Codex for Scalable Linux Security Patch Backporting
Trail of Bits is using OpenAI's Codex to automate the time-consuming process of backporting security fixes to stable Linux releases, significantly reducing patch preparation and review times.

The critical task of ensuring security in widely-used, older software versions is often hampered by the laborious and unrewarding nature of backporting security fixes. Trail of Bits is tackling this challenge head-on by integrating OpenAI's Codex into their workflow, dramatically accelerating the process of adapting patches for stable Linux releases. This AI-assisted approach has slashed the time required for patch preparation and review from days to mere hours, enabling faster delivery of crucial security updates for CVEs to distributions like Ubuntu, Fedora, and the Linux kernel itself.
Historically, backporting security fixes has been a significant bottleneck. The process involves adapting patches to older codebases, meticulously checking dependencies, and rigorously testing to ensure no new bugs are introduced. A single complex task, such as pinpointing an issue within a problematic commit, could consume over a week of unseen and unappreciated effort. This arduous nature often relegated backporting to a low priority for already stretched volunteer maintainers, leading to a substantial backlog of unfixed vulnerabilities in stable software.
Trail of Bits' innovative workflow employs AI agents to handle many of the repetitive and time-intensive activities. These agents are responsible for identifying missing fixes, adapting patches to suit older code versions, gathering validation evidence, executing tests, and compiling submission packets for human review. This division of labor significantly reduces the human commitment needed for each backport. Excluding initial project setup, the preparation and review of a straightforward backport now takes approximately 30 minutes of human attention, with more complex cases requiring around three hours.
While the AI agents handle the heavy lifting of patch adaptation and initial validation, human engineers remain crucial for reviewing the generated patches and submitting them to maintainers. Furthermore, essential steps like comprehensive regression testing and securing maintainer acceptance are still vital components of the process. However, by drastically lowering the human effort threshold, this AI-driven methodology makes undertaking a substantial volume of previously neglected security work practical and feasible.
This initiative addresses a fundamental disconnect in software deployment: the vast majority of users opt for stable, long-term support (LTS) releases over the absolute latest versions. For instance, approximately 95% of Ubuntu Linux installations are LTS variants. Similarly, data from Debian's popcon indicates that around 96% of installed Linux kernel packages are based on older, stable trees. This widespread reliance on older software means that many systems remain vulnerable to known exploits if security fixes are not backported.
The scale of the problem is immense, with thousands of known CVEs lacking fixes in stable branches. The project has already made significant strides, successfully backporting fixes for 149 distinct CVEs into stable Linux kernel releases by October 29, 2026, alongside numerous fixes for Fedora and Ubuntu packages. This proactive approach is vital as AI-assisted vulnerability discovery makes it increasingly easier to identify exploitable flaws in older code, underscoring the urgency of reducing this backlog.
By automating and accelerating the backporting process, Trail of Bits is not only improving the security posture of widely-used Linux systems but also demonstrating a powerful application of AI in addressing long-standing cybersecurity challenges. This work ensures that users can maintain the stability they prefer without compromising on essential security protections against evolving threats.