{"api_version":"1","generated_at":"2026-11-30T15:21:43+00:00","cve":"CVE-2026-139661","urls":{"html":"https://cve.report/CVE-2026-139661","api":"https://cve.report/api/cve/CVE-2026-139661.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-139661","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-139661"},"summary":{"title":"bpf, lsm: Reject writes into the BPF LSM program context","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf, lsm: Reject writes into the BPF LSM program context\n\nThe verifier types a load from a tracing-style context by its offset\nalone: btf_ctx_access() looks the offset up in the attach hook's\nprototype, and check_mem_access() stamps the resulting type onto the\ndestination register. Nothing tracks what the slot actually holds.\nThat is sound only as long as the context is read-only, and for BPF LSM\nit is not. lsm_verifier_ops wires ->is_valid_access() straight to\nbtf_ctx_access(), which never looks at enum bpf_access_type, so a store\ninto the context passes verification. Every other user of the helper\neither goes through bpf_tracing_btf_ctx_access() or open-codes the same\ntype != BPF_READ test first; BPF LSM is the only one that does neither.\n\nA program can therefore store a scalar of its choosing into a context\nslot, read the slot back, and get a register the verifier believes is a\ntrusted pointer of the hook's argument type. Handing that to a kfunc or\nhelper which dereferences a trusted argument turns it into an arbitrary\nkernel access. Route BPF LSM through bpf_tracing_btf_ctx_access() like\neveryone else.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-11-30 14:19:50","updated_at":"2026-11-30 14:19:50"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/23fd50ed3ae8ff501e90db8b253ee05992a0b563","name":"https://git.kernel.org/stable/c/23fd50ed3ae8ff501e90db8b253ee05992a0b563","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/ab9f32e30ac4087a72070d8cc33809c02797e8ef","name":"https://git.kernel.org/stable/c/ab9f32e30ac4087a72070d8cc33809c02797e8ef","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/6b810a303806b3a48c0d8cec99468956d15b8069","name":"https://git.kernel.org/stable/c/6b810a303806b3a48c0d8cec99468956d15b8069","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/63fa671681dc8f10d1f21032bc6da1c3398c782b","name":"https://git.kernel.org/stable/c/63fa671681dc8f10d1f21032bc6da1c3398c782b","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/c42da1d3ba9d5067cf3f0676b98bcb3f5f9e3ce1","name":"https://git.kernel.org/stable/c/c42da1d3ba9d5067cf3f0676b98bcb3f5f9e3ce1","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/d37ac6eda751255a96a46737abbb526ada2a1017","name":"https://git.kernel.org/stable/c/d37ac6eda751255a96a46737abbb526ada2a1017","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/ad74f678b76e9460193afc1683ba50ae5d2f6400","name":"https://git.kernel.org/stable/c/ad74f678b76e9460193afc1683ba50ae5d2f6400","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-139661","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139661","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected fc611f47f2188ade2b48ff6902d5cce8baac0c58 6b810a303806b3a48c0d8cec99468956d15b8069 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected fc611f47f2188ade2b48ff6902d5cce8baac0c58 23fd50ed3ae8ff501e90db8b253ee05992a0b563 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected fc611f47f2188ade2b48ff6902d5cce8baac0c58 ad74f678b76e9460193afc1683ba50ae5d2f6400 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected fc611f47f2188ade2b48ff6902d5cce8baac0c58 d37ac6eda751255a96a46737abbb526ada2a1017 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected fc611f47f2188ade2b48ff6902d5cce8baac0c58 ab9f32e30ac4087a72070d8cc33809c02797e8ef git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected fc611f47f2188ade2b48ff6902d5cce8baac0c58 63fa671681dc8f10d1f21032bc6da1c3398c782b git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected fc611f47f2188ade2b48ff6902d5cce8baac0c58 c42da1d3ba9d5067cf3f0676b98bcb3f5f9e3ce1 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 5.7","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.7 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.15.226 5.15.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.1.193 6.1.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.6.163 6.6.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.119 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.65 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.6 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["kernel/bpf/bpf_lsm.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"6b810a303806b3a48c0d8cec99468956d15b8069","status":"affected","version":"fc611f47f2188ade2b48ff6902d5cce8baac0c58","versionType":"git"},{"lessThan":"23fd50ed3ae8ff501e90db8b253ee05992a0b563","status":"affected","version":"fc611f47f2188ade2b48ff6902d5cce8baac0c58","versionType":"git"},{"lessThan":"ad74f678b76e9460193afc1683ba50ae5d2f6400","status":"affected","version":"fc611f47f2188ade2b48ff6902d5cce8baac0c58","versionType":"git"},{"lessThan":"d37ac6eda751255a96a46737abbb526ada2a1017","status":"affected","version":"fc611f47f2188ade2b48ff6902d5cce8baac0c58","versionType":"git"},{"lessThan":"ab9f32e30ac4087a72070d8cc33809c02797e8ef","status":"affected","version":"fc611f47f2188ade2b48ff6902d5cce8baac0c58","versionType":"git"},{"lessThan":"63fa671681dc8f10d1f21032bc6da1c3398c782b","status":"affected","version":"fc611f47f2188ade2b48ff6902d5cce8baac0c58","versionType":"git"},{"lessThan":"c42da1d3ba9d5067cf3f0676b98bcb3f5f9e3ce1","status":"affected","version":"fc611f47f2188ade2b48ff6902d5cce8baac0c58","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["kernel/bpf/bpf_lsm.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"5.7"},{"lessThan":"5.7","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"5.15.*","status":"unaffected","version":"5.15.226","versionType":"semver"},{"lessThanOrEqual":"6.1.*","status":"unaffected","version":"6.1.193","versionType":"semver"},{"lessThanOrEqual":"6.6.*","status":"unaffected","version":"6.6.163","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.119","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.65","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.6","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.15.226","versionStartIncluding":"5.7","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.1.193","versionStartIncluding":"5.7","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.6.163","versionStartIncluding":"5.7","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.119","versionStartIncluding":"5.7","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.65","versionStartIncluding":"5.7","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.6","versionStartIncluding":"5.7","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc1","versionStartIncluding":"5.7","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf, lsm: Reject writes into the BPF LSM program context\n\nThe verifier types a load from a tracing-style context by its offset\nalone: btf_ctx_access() looks the offset up in the attach hook's\nprototype, and check_mem_access() stamps the resulting type onto the\ndestination register. Nothing tracks what the slot actually holds.\nThat is sound only as long as the context is read-only, and for BPF LSM\nit is not. lsm_verifier_ops wires ->is_valid_access() straight to\nbtf_ctx_access(), which never looks at enum bpf_access_type, so a store\ninto the context passes verification. Every other user of the helper\neither goes through bpf_tracing_btf_ctx_access() or open-codes the same\ntype != BPF_READ test first; BPF LSM is the only one that does neither.\n\nA program can therefore store a scalar of its choosing into a context\nslot, read the slot back, and get a register the verifier believes is a\ntrusted pointer of the hook's argument type. Handing that to a kfunc or\nhelper which dereferences a trusted argument turns it into an arbitrary\nkernel access. Route BPF LSM through bpf_tracing_btf_ctx_access() like\neveryone else."}],"providerMetadata":{"dateUpdated":"2026-11-30T13:36:48.960Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/6b810a303806b3a48c0d8cec99468956d15b8069"},{"url":"https://git.kernel.org/stable/c/23fd50ed3ae8ff501e90db8b253ee05992a0b563"},{"url":"https://git.kernel.org/stable/c/ad74f678b76e9460193afc1683ba50ae5d2f6400"},{"url":"https://git.kernel.org/stable/c/d37ac6eda751255a96a46737abbb526ada2a1017"},{"url":"https://git.kernel.org/stable/c/ab9f32e30ac4087a72070d8cc33809c02797e8ef"},{"url":"https://git.kernel.org/stable/c/63fa671681dc8f10d1f21032bc6da1c3398c782b"},{"url":"https://git.kernel.org/stable/c/c42da1d3ba9d5067cf3f0676b98bcb3f5f9e3ce1"}],"title":"bpf, lsm: Reject writes into the BPF LSM program context","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-139661","datePublished":"2026-11-30T13:36:48.960Z","dateReserved":"2026-11-30T13:22:15.946Z","dateUpdated":"2026-11-30T13:36:48.960Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-30 14:19:50","lastModifiedDate":"2026-11-30 14:19:50","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"139661","Ordinal":"1","Title":"bpf, lsm: Reject writes into the BPF LSM program context","CVE":"CVE-2026-139661","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"139661","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf, lsm: Reject writes into the BPF LSM program context\n\nThe verifier types a load from a tracing-style context by its offset\nalone: btf_ctx_access() looks the offset up in the attach hook's\nprototype, and check_mem_access() stamps the resulting type onto the\ndestination register. Nothing tracks what the slot actually holds.\nThat is sound only as long as the context is read-only, and for BPF LSM\nit is not. lsm_verifier_ops wires ->is_valid_access() straight to\nbtf_ctx_access(), which never looks at enum bpf_access_type, so a store\ninto the context passes verification. Every other user of the helper\neither goes through bpf_tracing_btf_ctx_access() or open-codes the same\ntype != BPF_READ test first; BPF LSM is the only one that does neither.\n\nA program can therefore store a scalar of its choosing into a context\nslot, read the slot back, and get a register the verifier believes is a\ntrusted pointer of the hook's argument type. Handing that to a kfunc or\nhelper which dereferences a trusted argument turns it into an arbitrary\nkernel access. Route BPF LSM through bpf_tracing_btf_ctx_access() like\neveryone else.","Type":"Description","Title":"bpf, lsm: Reject writes into the BPF LSM program context"}]}}}