{"id":"CVE-2025-39990","state":"PUBLISHED","title":"bpf: Check the helper function is valid in get_helper_proto","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Check the helper function is valid in get_helper_proto\n\nkernel test robot reported verifier bug [1] where the helper func\npointer could be NULL due to disabled config option.\n\nAs Alexei suggested we could check on that in get_helper_proto\ndirectly. Marking tail_call helper func with BPF_PTR_POISON,\nbecause it is unused by design.\n\n  [1] https://lore.kernel.org/oe-lkp/202507160818.68358831-lkp@intel.com","publishedAt":"2025-10-15T07:56:07.295Z","updatedAt":"2026-10-21T12:37:41.130Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"f470378c7562a2818b45ed11c98973f2b89eedd3","status":"affected","lessThan":"dfbff47f120e4b0793ca0e0b8660361ccac25a74","versionType":"git"},{"version":"f470378c7562a2818b45ed11c98973f2b89eedd3","status":"affected","lessThan":"3d429cb1278e995e22995ef117fa96d223a67e93","versionType":"git"},{"version":"f470378c7562a2818b45ed11c98973f2b89eedd3","status":"affected","lessThan":"6233715b4b714068d6c831d214a4e8792109875a","versionType":"git"},{"version":"f470378c7562a2818b45ed11c98973f2b89eedd3","status":"affected","lessThan":"e4414b01c1cd9887bbde92f946c1ba94e40d6d64","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/core.c","kernel/bpf/verifier.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.8","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.8","versionType":"semver"},{"version":"6.6.160","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.50","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.16.10","status":"unaffected","lessThanOrEqual":"6.16.*","versionType":"semver"},{"version":"6.17","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/core.c","kernel/bpf/verifier.c"]}],"references":["https://git.kernel.org/stable/c/dfbff47f120e4b0793ca0e0b8660361ccac25a74","https://git.kernel.org/stable/c/3d429cb1278e995e22995ef117fa96d223a67e93","https://git.kernel.org/stable/c/6233715b4b714068d6c831d214a4e8792109875a","https://git.kernel.org/stable/c/e4414b01c1cd9887bbde92f946c1ba94e40d6d64"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:09.358Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/39xxx/CVE-2025-39990.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-39990","state":"PUBLISHED","datePublished":"2025-10-15T07:56:07.295Z","dateUpdated":"2026-10-21T12:37:41.130Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T07:20:57.150Z"},"containers":{"cna":{"title":"bpf: Check the helper function is valid in get_helper_proto","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Check the helper function is valid in get_helper_proto\n\nkernel test robot reported verifier bug [1] where the helper func\npointer could be NULL due to disabled config option.\n\nAs Alexei suggested we could check on that in get_helper_proto\ndirectly. Marking tail_call helper func with BPF_PTR_POISON,\nbecause it is unused by design.\n\n  [1] https://lore.kernel.org/oe-lkp/202507160818.68358831-lkp@intel.com"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"f470378c7562a2818b45ed11c98973f2b89eedd3","status":"affected","lessThan":"dfbff47f120e4b0793ca0e0b8660361ccac25a74","versionType":"git"},{"version":"f470378c7562a2818b45ed11c98973f2b89eedd3","status":"affected","lessThan":"3d429cb1278e995e22995ef117fa96d223a67e93","versionType":"git"},{"version":"f470378c7562a2818b45ed11c98973f2b89eedd3","status":"affected","lessThan":"6233715b4b714068d6c831d214a4e8792109875a","versionType":"git"},{"version":"f470378c7562a2818b45ed11c98973f2b89eedd3","status":"affected","lessThan":"e4414b01c1cd9887bbde92f946c1ba94e40d6d64","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/core.c","kernel/bpf/verifier.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.8","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.8","versionType":"semver"},{"version":"6.6.160","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.50","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.16.10","status":"unaffected","lessThanOrEqual":"6.16.*","versionType":"semver"},{"version":"6.17","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/core.c","kernel/bpf/verifier.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/dfbff47f120e4b0793ca0e0b8660361ccac25a74"},{"url":"https://git.kernel.org/stable/c/3d429cb1278e995e22995ef117fa96d223a67e93"},{"url":"https://git.kernel.org/stable/c/6233715b4b714068d6c831d214a4e8792109875a"},{"url":"https://git.kernel.org/stable/c/e4414b01c1cd9887bbde92f946c1ba94e40d6d64"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerability is reached only through the local `bpf(BPF_PROG_LOAD)` syscall, which is used to submit the crafted program to the verifier. There is no remote or adjacent-network path into `get_helper_proto()`.\nAC:L - On an affected build the attacker deterministically triggers the bug every time by loading a program that calls a helper whose weak proto is zeroed — no race, no memory-layout dependency, no unpredictable state. Both the `verifier_bug()` WARN path and the `bpf_get_branch_snapshot` inline path are fully under the attacker's control via the program bytecode.\nPR:L - Program load plus `CAP_PERFMON`/`CAP_BPF` is required, but `CAP_PERFMON` is a narrow, non-root capability commonly granted to unprivileged profiling and BPF observability daemons, and `bpf_token_capable()` explicitly makes it delegable to unprivileged users inside user namespaces via bpffs BPF tokens. This is an ordinary low-privileged account boundary, not init-namespace root.\nUI:N - The attacker loads and exercises the BPF program entirely on their own; no other user or administrator has to perform any action.\nS:U - The corruption and the crash both occur inside the kernel that is already the security authority for the calling process — a conventional local kernel privilege-escalation/DoS, with no VM, IOMMU, or sandbox boundary crossed.\nC:H - With all `arg_type[]` zeroed to `ARG_DONTCARE` the verifier validates nothing, and the inlined `bpf_get_branch_snapshot` copies LBR records (kernel from/to instruction pointers) to an attacker-chosen destination that can be a readable BPF map value, disclosing kernel text addresses and defeating KASLR; the same unvalidated-pointer primitive generalizes to broader kernel memory disclosure.\nI:H - `__intel_pmu_snapshot_branch_stack()` performs `memcpy(entries, cpuc->lbr_entries, 24 * cnt)` with `entries` an entirely unvalidated attacker-supplied scalar, giving an arbitrary kernel-memory write of up to several hundred bytes — a direct privilege-escalation primitive.\nA:H - The common path hits `verifier_bug()` → `BPF_WARN_ONCE`, which taints the kernel and panics outright on the many hardened/production and Android kernels that set `panic_on_warn=1`; the arbitrary-write path trivially oopses the kernel by targeting unmapped or critical memory."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-10-21T12:37:41.130Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"6.6.160"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"6.12.50"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"6.16.10"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"6.17"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2025-39990","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2026-10-15T21:55:55.410522Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-15T22:02:35.724Z"}}]}}}