CVE-2026-68462

bpf: Reject negative const offsets for buffer pointers

Published Aug 15, 2026 CVSS 3.1 · 7.8 High EPSS < 1% KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

bpf: Reject negative const offsets for buffer pointers

The verifier rejects variable offsets for PTR_TO_TP_BUFFER and PTR_TO_BUF
accesses, but it currently accepts a constant negative offset produced by
pointer arithmetic.

Commit 022ac0750883 ("bpf: use reg->var_off instead of reg->off for
pointers") moved constant pointer offsets from reg->off to reg->var_off.
However, __check_buffer_access() continued to check only the instruction
offset. An access with reg->var_off 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->var_off.value. An eight-byte access starting at -8 wraps
the calculated end to zero, allowing the program to load and attach
without increasing max_tp_access.

After ensuring that reg->var_off 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
PTR_TO_TP_BUFFER and PTR_TO_BUF.

Analysis

AI-generated

Technical impact

The Linux kernel BPF verifier mistakenly accepts a constant negative offset when calculating buffer pointer accesses. Because the verifier only checked the instruction offset, a pointer arithmetic that produced a signed negative value would bypass the bounds check entirely. Consequently, the verifier would treat the negative start as the buffer’s end, which wraps around and allows the BPF program to load and attach without increasing the maximum allowable tracepoint access.

Affected Systems

All Linux kernel releases prior to commit 022ac0750883 are affected. The flaw exists in every kernel variant that does not contain the patch that moves constant pointer offsets to reg->var_off and adds a check for negative offsets. Systems that enable raw tracepoints and allow BPF programs to use PTR_TO_TP_BUFFER or PTR_TO_BUF accesses are impacted regardless of distribution or custom kernel build.

Risk and Exploitability

The CVSS score of 7.8 indicates moderate to high severity, and the EPSS score is below 1%, suggesting low expected exploitation probability, but the vulnerability is not listed in CISA KEV. The flaw relies on the ability to load a BPF program, which typically requires write access to the BPF filesystem and is generally available to users with sufficient privileges. If such a user can craft a program that triggers the negative offset flaw, the program would execute in kernel mode and could potentially perform out-of-bounds memory accesses, leading to corruption of kernel data structures. Because the vulnerability is not automatically mitigated beyond the patch, the risk remains significant until the kernel is updated or mitigated by restricting BPF loading or disabling raw tracepoints.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply a kernel update that includes commit 022ac0750883, which moves constant pointer offsets to reg->var_off and validates signed starts, rejecting negative buffer accesses
  • If an immediate kernel upgrade is not feasible, restrict BPF program loading to trusted users, enforce the "no_new_privs" flag, or drop capabilities so that loaded programs cannot gain additional privileges
  • Disable raw tracepoints or other BPF features that depend on PTR_TO_TP_BUFFER or PTR_TO_BUF when they are not required for your workload

Generated by OpenCVE AI on August 18, 2026 at 01:27 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}

Type Values Removed Values Added
Weaknesses CWE-119
CWE-787
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: bpf: Reject negative const offsets for buffer pointers The verifier rejects variable offsets for PTR_TO_TP_BUFFER and PTR_TO_BUF accesses, but it currently accepts a constant negative offset produced by pointer arithmetic. Commit 022ac0750883 ("bpf: use reg->var_off instead of reg->off for pointers") moved constant pointer offsets from reg->off to reg->var_off. However, __check_buffer_access() continued to check only the instruction offset. An access with reg->var_off 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->var_off.value. An eight-byte access starting at -8 wraps the calculated end to zero, allowing the program to load and attach without increasing max_tp_access. After ensuring that reg->var_off 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 PTR_TO_TP_BUFFER and PTR_TO_BUF.
Title bpf: Reject negative const offsets for buffer pointers
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-119

    Improper Restriction of Operations within the Bounds of a Memory Buffer

  • CWE-190

    Integer Overflow or Wraparound

  • CWE-787

    Out-of-bounds Write

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Aug 17, 2026, 5:39 AM
Reserved
Jul 30, 2026, 9:28 AM
Status
Received
Published
Aug 15, 2026, 6:18 AM
Modified
Aug 17, 2026, 6:17 AM
Severity
Moderate
Public date
Aug 15, 2026, 12:00 AM