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.
Published: 2026-08-15
Score: n/a
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

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

No CVSS score is provided and the EPSS score is not available; 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.

Generated by OpenCVE AI on August 15, 2026 at 21:10 UTC.

Remediation

No vendor fix or workaround currently provided.

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 15, 2026 at 21:10 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Sat, 15 Aug 2026 21:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-119
CWE-787

Sat, 15 Aug 2026 06:00:00 +0000

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

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-08-15T05:51:21.948Z

Reserved: 2026-07-30T09:28:09.395Z

Link: CVE-2026-68462

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-15T06:18:39.803

Modified: 2026-08-15T06:18:39.803

Link: CVE-2026-68462

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-15T21:15:03Z

Weaknesses
  • CWE-119

    Improper Restriction of Operations within the Bounds of a Memory Buffer

  • CWE-787

    Out-of-bounds Write