# CVE-2026-45903: bpf: Fix memory access flags in helper prototypes

- Severity: High 7.1 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.16%, higher than 5% of CVEs (2026-12-01)
- Published: 2026-05-27T12:17:11.382Z
- Modified: 2026-06-24T16:28:55.553Z
- Weaknesses: CWE-125
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

bpf: Fix memory access flags in helper prototypes

After commit 37cce22dbd51 ("bpf: verifier: Refactor helper access type tracking"),
the verifier started relying on the access type flags in helper
function prototypes to perform memory access optimizations.

Currently, several helper functions utilizing ARG_PTR_TO_MEM lack the
corresponding MEM_RDONLY or MEM_WRITE flags. This omission causes the
verifier to incorrectly assume that the buffer contents are unchanged
across the helper call. Consequently, the verifier may optimize away
subsequent reads based on this wrong assumption, leading to correctness
issues.

For bpf_get_stack_proto_raw_tp, the original MEM_RDONLY was incorrect
since the helper writes to the buffer. Change it to ARG_PTR_TO_UNINIT_MEM
which correctly indicates write access to potentially uninitialized memory.

Similar issues were recently addressed for specific helpers in commit
ac44dcc788b9 ("bpf: Fix verifier assumptions of bpf_d_path's output buffer")
and commit 2eb7648558a7 ("bpf: Specify access type of bpf_sysctl_get_name args").

Fix these prototypes by adding the correct memory access flags.

(As written by CVE List.)

## Affected

- Linux Linux: from 37cce22dbd51a3ef7f6c08c3fb5f1c5075a17fbb before fdfe75161f6e8c41a7d3023fbb815b537107b806; from 37cce22dbd51a3ef7f6c08c3fb5f1c5075a17fbb before aa319592892068bd960c1a1c07bd621085b0c63d; from 37cce22dbd51a3ef7f6c08c3fb5f1c5075a17fbb before 802eef5afb1865bc5536a5302c068ba2215a1f72; 6.14 (not affected: before 6.14; from 6.18.14 up to 6.18.*; from 6.19.4 up to 6.19.*; from 7.0 up to *)
- linux linux_kernel: from 6.14 before 6.18.14; from 6.19 before 6.19.4

## References

- <https://git.kernel.org/stable/c/fdfe75161f6e8c41a7d3023fbb815b537107b806> (patch)
- <https://git.kernel.org/stable/c/aa319592892068bd960c1a1c07bd621085b0c63d> (patch)
- <https://git.kernel.org/stable/c/802eef5afb1865bc5536a5302c068ba2215a1f72> (patch)

## Sources

- CVE List: [CVE-2026-45903](https://www.cve.org/CVERecord?id=CVE-2026-45903), CVE Terms of Use, modified 2026-05-27
- NVD: [CVE-2026-45903](https://nvd.nist.gov/vuln/detail/CVE-2026-45903), Public domain, modified 2026-06-24

---

Page: https://cve.day/CVE-2026-45903 · Whole record: https://cve.day/CVE-2026-45903.json · Rebuilt by cve.day 2026-11-25T22:59:22.497Z
