Automated patch backporting in Linux (experience paper)
Ridwan Shariffdeen, Xiang Gao, Gregory J. Duck, Shin Hwei Tan, Julia Lawall, Abhik Roychoudhury
Abstract
Whenever a bug or vulnerability is detected in the Linux kernel, the kernel developers will endeavour to fix it by introducing a patch into the mainline version of the Linux kernel source tree. However, many users run older "stable" versions of Linux, meaning that the patch should also be "backported" to one or more of these older kernel versions. This process is error-prone and there is usually a long delay in publishing the backported patch. Based on an empirical study, we show that around 8% of all commits submitted to Linux mainline are backported to older versions, but often more than one month elapses before the backport is available. Hence, we propose a patch backporting technique that can automatically transfer patches from the mainline version of Linux into older stable versions. Our approach first synthesizes a partial transformation rule based on a Linux mainline patch. This rule can then be generalized by analysing the alignment between the mainline and target versions. The generalized rule is then applied to the target version to produce a backported patch. We have implemented our transformation technique in a tool called FixMorph and evaluated it on 350 Linux mainline patches. FixMorph correctly backports 75.1% of them. Compared to existing techniques, FixMorph improves both the precision and recall in backporting patches. Apart from automation of software maintenance tasks, patch backporting helps in reducing the exposure to known security vulnerabilities in stable versions of the Linux kernel. CCS CONCEPTS • Software and its engineering → Automatic programming; Software maintenance tools.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext b00fb4fb-d1b9-45cd-a425-531a76848c0fCited by top-tier papers19
- Understanding the Practice of Security Patch Management across Multiple Branches in OSS ProjectsXin Tan, Yuan Zhang, Jiajun Cao, Kun Sun et al.WWW 2022 · 19 citations
- Precise (Un)Affected Version Analysis for Web VulnerabilitiesYoukun Shi, Yuan Zhang, Tianhan Luo, Xiangyu Mao et al.ASE 2022 · 7 citations
- Automating Zero-Shot Patch Porting for Hard ForksShengyi Pan, You Wang, Zhongxin Liu, Xing Hu et al.ISSTA 2024 · 5 citations
- MigGPT: Harnessing Large Language Models for Automated Migration of Out-of-Tree Linux Kernel Patches Across VersionsPucheng Dang, Di Huang, Dong Li, Kang Chen et al.NeurIPS 2025 · 3 citations
- Vulnerability-Affected Versions Identification: How Far Are We?Xingchu Chen, Chengwei Liu, Jialun Cao, Yang Xiao et al.ASE 2025 · 3 citations
Builds on2
- Feedback-driven semi-supervised synthesis of program transformationsXiang Gao, Shraddha Barke, Arjun Radhakrishna, Gustavo Soares et al.OOPSLA 2020 · 17 citations
- SPINFER: Inferring Semantic Patches for the Linux KernelLucas Serrano, Van-Anh Nguyen, Ferdian Thung, Lingxiao Jiang et al.USENIX ATC 2020 · 16 citations
Related papers
- Enhancing OSS Patch Backporting with SemanticsSu Yang, Yang Xiao, Zhengzi Xu, Chengyi Sun et al.CCS 2023 · 8 citations
- PortGPT: Towards Automated Backporting Using Large Language ModelsZhaoyang Li, Zheng Yu, Jingyi Song, Meng Xu et al.S&P 2026 · 2 citations
- pPatch: Automated Vulnerability UnpatchingTianyi Jing, Pengyu Ding, Meng Xu, Yinhao Hu et al.FSE 2026
- LLMPort: Cross-file Patch Porting via Task Decomposition and Self-correctionBofei Chen, Lei Zhang, Peng Deng, Nan Wang et al.ASE 2025
- PatchScope: LLM-Enhanced Fine-Grained Stable Patch Classification for Linux KernelRongkai Liu, Heyuan Shi, Shuning Liu, Chao Hu et al.ISSTA 2025 · 3 citations
