CVE-2026-68462: bpf: Reject negative const offsets for buffer pointers
In the Linux kernel, the following vulnerability has been resolved:
bpf: Reject negative const offsets for buffer pointers
The verifier rejects variable offsets for PTRTOTPBUFFER and PTRTOBUF accesses, but it currently accepts a constant negative offset produced by pointer arithmetic.
Commit 022ac0750883 ("bpf: use reg->varoff instead of reg->off for pointers") moved constant pointer offsets from reg->off to reg->varoff. However, checkbufferaccess() continued to check only the instruction offset. An access with reg->varoff equal to -8 and an instruction offset of zero therefore passes verification.
For writable raw tracepoints, the access end is also calculated from the unsigned reg->varoff.value. An eight-byte access starting at -8 wraps the calculated end to zero, allowing the program to load and attach without increasing maxtpaccess.
After ensuring that reg->varoff is constant, calculate the effective access start using signed arithmetic and reject it when it is negative. Use the validated start to calculate the access end for both PTRTOTPBUFFER and PTRTOBUF.
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-68462?
The severity of CVE-2026-68462 is rated at 55, indicating a medium risk level.
How do I fix CVE-2026-68462?
To fix CVE-2026-68462, ensure that your Linux kernel is updated to a version that incorporates the patch addressing this vulnerability.
What are the potential impacts of CVE-2026-68462?
CVE-2026-68462 may allow an attacker to exploit the kernel by using negative constant offsets, potentially leading to buffer pointer issues.
Where was CVE-2026-68462 published?
CVE-2026-68462 was published on August 15, 2026.
In which software is CVE-2026-68462 found?
CVE-2026-68462 is found in the Linux kernel.