CVE-2025-38591 Details
Description
In the Linux kernel, the following vulnerability has been resolved: bpf: Reject narrower access to pointer ctx fields The following BPF program, simplified from a syzkaller repro, causes a kernel warning: r0 = *(u8 *)(r1 + 169); exit; With pointer field sk being at offset 168 in __sk_buff. This access is detected as a narrower read in bpf_skb_is_valid_access because it doesn't match offsetof(struct __sk_buff, sk). It is therefore allowed and later proceeds to bpf_convert_ctx_access. Note that for the "is_narrower_load" case in the convert_ctx_accesses(), the insn->off is aligned, so the cnt may not be 0 because it matches the offsetof(struct __sk_buff, sk) in the bpf_convert_ctx_access. However, the target_size stays 0 and the verifier errors with a kernel warning: verifier bug: error during ctx access conversion(1) This patch fixes that to return a proper "invalid bpf_context access off=X size=Y" error on the load instruction. The same issue affects multiple other fields in context structures that allow narrow access. Some other non-affected fields (for sk_msg, sk_lookup, and sockopt) were also changed to use bpf_ctx_range_ptr for consistency. Note this syzkaller crash was reported in the "Closes" link below, which used to be about a different bug, fixed in commit fce7bd8e385a ("bpf/verifier: Handle BPF_LOAD_ACQ instructions in insn_def_regno()"). Because syzbot somehow confused the two bugs, the new crash and repro didn't get reported to the mailing list.
A vulnerability in the Linux kernel's BPF (Berkeley Packet Filter) implementation allows for improper access validation to pointer context fields, specifically within the __sk_buff structure. This issue, which affects the stable Linux kernel, was introduced in a previous commit that simplified access validation but inadvertently allowed narrower reads that could bypass intended checks. As a result, certain BPF programs could trigger kernel warnings by accessing context fields in a way that the verifier misinterpreted, leading to a failure in proper access conversion. The vulnerability arises because the BPF verifier allows these narrower accesses to proceed, despite them not aligning with the expected offsets of the context fields, which could potentially be exploited to cause a verifier error and disrupt normal kernel operations.
Users can apply the patch included in the upstream commit e09299225d5ba3916c91ef70565f7d2187e4cca0 to address this vulnerability. Instructions for applying the patch can be found in the Linux kernel stable tree.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jun 10, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| NVD-CWE-noinfo | Insufficient Information to Classify Weakness | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| linux linux kernel | >= 4.13, < 6.16.1 |
CPE
Remediation
| |
Change History
10 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Sep 14, 2026 | CVE Modified | kernel.org |
| Sep 14, 2026 | CVE Modified | siemens-SADP |
| Jul 14, 2026 | CVE Modified | siemens-SADP |
| Jun 17, 2026 | CVE Modified | kernel.org |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Mar 17, 2026 | Modified Analysis | [email protected] |
| Feb 6, 2026 | CVE Modified | kernel.org |
| Jan 23, 2026 | CVE Modified | kernel.org |
| Nov 26, 2025 | Initial Analysis | [email protected] |
| Aug 19, 2025 | New CVE Received | kernel.org |