bpf, lsm: Reject writes into the BPF LSM program context

Summary

CVECVE-2026-139661
StatePUBLISHED
AssignerLinux
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-11-30 14:19:50 UTC
Updated2026-11-30 14:19:50 UTC
DescriptionIn the Linux kernel, the following vulnerability has been resolved: bpf, lsm: Reject writes into the BPF LSM program context The verifier types a load from a tracing-style context by its offset alone: btf_ctx_access() looks the offset up in the attach hook's prototype, and check_mem_access() stamps the resulting type onto the destination register. Nothing tracks what the slot actually holds. That is sound only as long as the context is read-only, and for BPF LSM it is not. lsm_verifier_ops wires ->is_valid_access() straight to btf_ctx_access(), which never looks at enum bpf_access_type, so a store into the context passes verification. Every other user of the helper either goes through bpf_tracing_btf_ctx_access() or open-codes the same type != BPF_READ test first; BPF LSM is the only one that does neither. A program can therefore store a scalar of its choosing into a context slot, read the slot back, and get a register the verifier believes is a trusted pointer of the hook's argument type. Handing that to a kfunc or helper which dereferences a trusted argument turns it into an arbitrary kernel access. Route BPF LSM through bpf_tracing_btf_ctx_access() like everyone else.

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Linux Linux affected fc611f47f2188ade2b48ff6902d5cce8baac0c58 6b810a303806b3a48c0d8cec99468956d15b8069 git Not specified
CNA Linux Linux affected fc611f47f2188ade2b48ff6902d5cce8baac0c58 23fd50ed3ae8ff501e90db8b253ee05992a0b563 git Not specified
CNA Linux Linux affected fc611f47f2188ade2b48ff6902d5cce8baac0c58 ad74f678b76e9460193afc1683ba50ae5d2f6400 git Not specified
CNA Linux Linux affected fc611f47f2188ade2b48ff6902d5cce8baac0c58 d37ac6eda751255a96a46737abbb526ada2a1017 git Not specified
CNA Linux Linux affected fc611f47f2188ade2b48ff6902d5cce8baac0c58 ab9f32e30ac4087a72070d8cc33809c02797e8ef git Not specified
CNA Linux Linux affected fc611f47f2188ade2b48ff6902d5cce8baac0c58 63fa671681dc8f10d1f21032bc6da1c3398c782b git Not specified
CNA Linux Linux affected fc611f47f2188ade2b48ff6902d5cce8baac0c58 c42da1d3ba9d5067cf3f0676b98bcb3f5f9e3ce1 git Not specified
CNA Linux Linux affected 5.7 Not specified
CNA Linux Linux unaffected 5.7 semver Not specified
CNA Linux Linux unaffected 5.15.226 5.15.* semver Not specified
CNA Linux Linux unaffected 6.1.193 6.1.* 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/23fd50ed3ae8ff501e90db8b253ee05992a0b563 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/ab9f32e30ac4087a72070d8cc33809c02797e8ef 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/6b810a303806b3a48c0d8cec99468956d15b8069 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/63fa671681dc8f10d1f21032bc6da1c3398c782b 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/c42da1d3ba9d5067cf3f0676b98bcb3f5f9e3ce1 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/d37ac6eda751255a96a46737abbb526ada2a1017 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/ad74f678b76e9460193afc1683ba50ae5d2f6400 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