CVE-2026-139780

bpf: Reject oversized stream read buffers

Published Nov 30, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

bpf: Reject oversized stream read buffers

BPF_PROG_STREAM_READ_BY_FD exposes stream_buf_len as a u32, but the
internal stream reader accepts an int. Values above INT_MAX therefore
become negative before bpf_stream_read(), producing negative consumption
lengths. The generic usercopy size check prevents the oversized copy, but
emits a warning and reports EFAULT for an unchecked argument.

Change bpf_prog_stream_read() to accept u32 and reject values that the
signed reader cannot represent.

Analysis

AI-generated

Technical impact

The vulnerability arises because the BPF program stream read function accepts a 32‑bit unsigned length token, but the internal reader interprets it as a signed 32‑bit integer. When the caller supplies a value larger than the maximum signed 32‑bit integer, the value is interpreted as a negative number, causing the kernel to perform a negative copy length. The generic user‑space copy check emits a warning and then returns EFAULT, effectively aborting the BPF program. The negative consumption length can trigger a kernel fault or unexpected behavior, resulting in a denial‑of‑service condition for the affected process and potentially the entire system if privileged code paths are involved.

Affected Systems

This flaw exists in all Linux kernel releases that include the bpf: stream read functionality up to the point of the supplied patch. It affects the generic Linux kernel product; no specific vendor or product version is listed, so all affected kernels before the patch are impacted. The CWE most applicable to this type of bug is unsigned-to‑signed conversion error.

Risk and Exploitability

The EPSS score is not available and the vulnerability is not listed in CISA KEV, indicating no publicly known exploits yet. The issue requires the ability to submit a BPF program that uses the stream read interface, which typically requires high privilege or a compromised kernel. The attack vector is therefore limited to local malicious or elevated users who can load BPF programs. While the bug does not provide remote code execution, it can be leveraged to cause a kernel fault, leading to a denial‑of‑service or potentially escalating privileges if a crash can be forced.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the kernel to a version that includes the patch that changes bpf_prog_stream_read() to accept u32 and rejects values beyond INT_MAX
  • If a patch cannot be applied immediately, disable or restrict the use of the BPF stream read interface via appropriate kernel configuration or sysctl settings to prevent the negative copy length from occurring
  • Monitor system logs for EFAULT errors produced by BPF stream read operations as an indicator of attempted exploitation and investigate any unexpected BPF program activity

Generated by OpenCVE AI on December 1, 2026 at 01:13 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-195
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: bpf: Reject oversized stream read buffers BPF_PROG_STREAM_READ_BY_FD exposes stream_buf_len as a u32, but the internal stream reader accepts an int. Values above INT_MAX therefore become negative before bpf_stream_read(), producing negative consumption lengths. The generic usercopy size check prevents the oversized copy, but emits a warning and reports EFAULT for an unchecked argument. Change bpf_prog_stream_read() to accept u32 and reject values that the signed reader cannot represent.
Title bpf: Reject oversized stream read buffers
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-195

    Signed to Unsigned Conversion Error

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:37 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:20 PM
Modified
Nov 30, 2026, 2:20 PM