Linux
bpf: Fix UAF in bpf_trampoline_multi_attach_free on update failure
In the Linux kernel, the following vulnerability has been resolved: bpf: Fix UAF in bpf_trampoline_multi_attach_free on update failure When bpf_trampoline_update() fails before modify_fentry_multi()/ unregister_fentry_multi() is called, cur_image is unchanged (cur_image == old_image) and ftrace still calls into it. Freeing old_image in that case causes a UAF. Only free old_image when it differs from cur_image.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= aef4dfa790b22d8052cfb78044eadbe03c876c39, < 65c3939656fd7848e9274faa07c26748b5bf049c
- >= aef4dfa790b22d8052cfb78044eadbe03c876c39, < 0253073fb7d79a2dd2eae9581ea16db2aef395a6
Fixed in 65c3939656fd7848e9274faa07c26748b5bf049c, 0253073fb7d79a2dd2eae9581ea16db2aef395a6
- 7.2
Fixed in 0, 7.2.6, 7.3
Mitigation
Upgrade Linux to 65c3939656fd7848e9274faa07c26748b5bf049c or 0253073fb7d79a2dd2eae9581ea16db2aef395a6 or later.
Upgrade Linux to 0 or 7.2.6 or 7.3 or later.
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.