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

bpf: Reject negative optlen in cgroup getsockopt hook

A cgroup getsockopt BPF program can shrink ctx->optlen after the
kernel getsockopt handler has run. The kernel-buffer variant, used by
TCP_ZEROCOPY_RECEIVE, only rejects values larger than the original
length.

If BPF writes a negative optlen, that value is accepted and propagated
back to the TCP getsockopt code. It can then be passed to
copy_to_sockptr() as a size_t and trigger the hardened usercopy
bytes > INT_MAX warning.

Reject negative ctx.optlen in __cgroup_bpf_run_filter_getsockopt_kern(),
matching the lower-bound validation already present in the sockptr-based
getsockopt hook.
Published: 2026-09-17
Score: n/a
EPSS: < 1% Very Low
KEV: No
Impact: Potential memory corruption via malformed BPF getsockopt optlen
Action: Apply Patch
AI Analysis

Impact

A BPF program attached to a cgroup getsockopt hook can reduce the optlen field after the kernel handler has executed. Because the kernel accepts negative optlen values, they are propagated to the TCP getsockopt path and ultimately cast to size_t for copy_to_sockptr(). This may trigger a hardened usercopy warning for bytes greater than INT_MAX and can potentially result in memory corruption or a failure of the hardened copy logic. The weakness involves improper input validation and length handling in kernel code.

Affected Systems

All Linux kernel builds are impacted because the vulnerability resides in the core BPF and getsockopt logic. Versions prior to the application of the patch that rejects negative optlen values are susceptible; specific version identifiers are not provided in the report.

Risk and Exploitability

The EPSS score is below 1% and the vulnerability is not listed in the CISA KEV catalog, indicating a low likelihood of exploitation at present. The attack requires delivery of a BPF program that runs in a cgroup getsockopt hook, which typically requires local or privileged access to load the program. Because the flaw involves kernel memory handling, successful exploitation could lead to privilege escalation or denial of service, but no publicly available exploits are known.

Generated by OpenCVE AI on September 20, 2026 at 01:54 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the latest Linux kernel patch that enforces non‑negative optlen values in __cgroup_bpf_run_filter_getsockopt_kern()
  • Limit the use of cgroup getsockopt BPF programs to trusted code, or avoid enabling the hook if not required
  • Configure the system to reject or quarantine untrusted BPF programs that target socket options

Generated by OpenCVE AI on September 20, 2026 at 01:54 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Debian DLA Debian DLA DLA-4817-1 linux-6.12 security update
Debian DSA Debian DSA DSA-6528-1 linux security update
History

Sun, 20 Sep 2026 02:15:00 +0000

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

Thu, 17 Sep 2026 16:30:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: bpf: Reject negative optlen in cgroup getsockopt hook A cgroup getsockopt BPF program can shrink ctx->optlen after the kernel getsockopt handler has run. The kernel-buffer variant, used by TCP_ZEROCOPY_RECEIVE, only rejects values larger than the original length. If BPF writes a negative optlen, that value is accepted and propagated back to the TCP getsockopt code. It can then be passed to copy_to_sockptr() as a size_t and trigger the hardened usercopy bytes > INT_MAX warning. Reject negative ctx.optlen in __cgroup_bpf_run_filter_getsockopt_kern(), matching the lower-bound validation already present in the sockptr-based getsockopt hook.
Title bpf: Reject negative optlen in cgroup getsockopt hook
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-09-17T16:06:49.081Z

Reserved: 2026-09-11T19:38:34.790Z

Link: CVE-2026-90157

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-09-17T17:17:08.817

Modified: 2026-09-17T17:17:08.817

Link: CVE-2026-90157

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-20T02:00:13Z

Weaknesses
  • CWE-119

    Improper Restriction of Operations within the Bounds of a Memory Buffer

  • CWE-20

    Improper Input Validation