bpf: Fix stale offload->prog pointer after realloc

Summary

CVECVE-2026-139308
StatePUBLISHED
AssignerLinux
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-11-30 14:18:54 UTC
Updated2026-11-30 14:18:54 UTC
DescriptionIn the Linux kernel, the following vulnerability has been resolved: bpf: Fix stale offload->prog pointer after realloc bpf_prog_realloc() moves a program that the rewrites of the verifier make outgrow its pages. It updates aux->prog, but not the offload->prog of a device-bound program. When the device is unregistered, __bpf_offload_dev_netdev_unregister() hands the stale pointer to __bpf_prog_offload_destroy(), which faults on the freed program: BUG: unable to handle page fault for address: ffffc90000071050 RIP: 0010:__bpf_prog_offload_destroy+0x3f/0x310 It takes the right to load a device-bound XDP program, CAP_BPF and CAP_NET_ADMIN or a BPF token, and a device that can be removed. Commit a1aa9ef47c29 ("bpf: Fix stale offload->prog pointer after constant blinding") repaired the other place that replaces a program. Do the same here. Nothing keeps the device while a program is loaded, so it can also be unregistered at that very moment. That frees the offload, and it may have read offload->prog already when the old copy of the program is freed. In both places update the pointer under bpf_devs_lock, before the old copy goes.

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Linux Linux affected ab3f0063c48c26c927851b6767824e35a716d878 2190de7333369052fff76ccb686567ea648350b6 git Not specified
CNA Linux Linux affected ab3f0063c48c26c927851b6767824e35a716d878 4afa9934aa8da40d8b03d7f18ddbee7113bc8f9b git Not specified
CNA Linux Linux affected ab3f0063c48c26c927851b6767824e35a716d878 87c3268b4acac6942d1dbf600edbf6374be0c91b git Not specified
CNA Linux Linux affected ab3f0063c48c26c927851b6767824e35a716d878 80d3aaf751b9a2a1d204f3ee4e2ef3bb1207cbc9 git Not specified
CNA Linux Linux affected ab3f0063c48c26c927851b6767824e35a716d878 8e83d53596445fcf5b0385e5fbe8bcd971e06d06 git Not specified
CNA Linux Linux affected 4.15 Not specified
CNA Linux Linux unaffected 4.15 semver Not specified
CNA Linux Linux unaffected 6.6.163 6.6.* semver Not specified
CNA Linux Linux unaffected 6.12.119 6.12.* semver Not specified
CNA Linux Linux unaffected 6.18.65 6.18.* semver Not specified
CNA Linux Linux unaffected 7.3.6 7.3.* semver Not specified
CNA Linux Linux unaffected 7.4-rc1 * original_commit_for_fix Not specified

References

ReferenceSourceLinkTags
git.kernel.org/stable/c/80d3aaf751b9a2a1d204f3ee4e2ef3bb1207cbc9 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/2190de7333369052fff76ccb686567ea648350b6 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/4afa9934aa8da40d8b03d7f18ddbee7113bc8f9b 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/8e83d53596445fcf5b0385e5fbe8bcd971e06d06 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/87c3268b4acac6942d1dbf600edbf6374be0c91b 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report