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

bpf: fix end-of-list detection in cgroup_storage_get_next_key()

list_next_entry() never returns NULL -- when the current element is the
last entry it wraps to the list head via container_of(). The subsequent
NULL check is therefore dead code and get_next_key() never returns
-ENOENT for the last element, instead reading storage->key from a bogus
pointer that aliases internal map fields and copying the result to
userspace.

Replace it with list_entry_is_head() so the function correctly returns
-ENOENT when there are no more entries.
Published: 2026-05-27
Score: n/a
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability resides in the Linux kernel's BPF subsystem, specifically the cgroup_storage_get_next_key() routine. The code incorrectly detects the end of the key list, causing it to dereference a bogus pointer that overlaps internal map fields. The erroneous value is then copied across to user space, effectively exposing kernel memory contents. This flaw can allow a malicious actor with the ability to load or query BPF cgroup keys to read sensitive data from the kernel, leading to an information disclosure that could be leveraged for further attacks. The weakness stems from improperly checking list boundaries, resulting in an out-of-bounds read. No arbitrary code execution capability is directly demonstrated, but the data leakage is significant.

Affected Systems

All Linux kernel installations that have not applied the recent BPF patch. The CVE affects any kernel that includes the cgroup_storage_get_next_key() function without the fix, which spans the vast majority of active kernel versions prior to the commit referenced. Administrators should check whether their running kernel corresponds to a version before the fix or if the kernel is unpatched.

Risk and Exploitability

The CVSS score is not provided in the CVE listing, and the EPSS score is unavailable, so a precise exploitation probability cannot be quantified. Nevertheless, the issue is a kernel memory disclosure flaw, and given that BPF can be executed by users with appropriate privileges, the vulnerability is a notable risk for systems that expose BPF functionality. The vulnerability is not currently catalogued in CISA’s KEV, suggesting no widespread exploitation has been observed. The most likely attack vector would involve a BPF program that queries cgroup keys, which may be performed by users with CAP_SYS_ADMIN or by applications with elevated privileges. Because the fault leads to a kernel read error, exploitation requires careful construction of a key query that triggers the end-of-list misdetection.

Generated by OpenCVE AI on May 27, 2026 at 11:44 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update the Linux kernel to a version that contains the patch removing the faulty end-of-list detection (see commit c... from the kernel’s stable series).
  • If the patch cannot be applied immediately, restrict BPF usage by disabling cgroup key queries or removing the CAP_SYS_ADMIN capability from untrusted processes.
  • Monitor system logs for read errors and anomalous BPF activity, and apply least-privilege access controls to limit which users can load BPF programs.

Generated by OpenCVE AI on May 27, 2026 at 11:44 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 27 May 2026 12:00:00 +0000

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

Wed, 27 May 2026 10:30:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: bpf: fix end-of-list detection in cgroup_storage_get_next_key() list_next_entry() never returns NULL -- when the current element is the last entry it wraps to the list head via container_of(). The subsequent NULL check is therefore dead code and get_next_key() never returns -ENOENT for the last element, instead reading storage->key from a bogus pointer that aliases internal map fields and copying the result to userspace. Replace it with list_entry_is_head() so the function correctly returns -ENOENT when there are no more entries.
Title bpf: fix end-of-list detection in cgroup_storage_get_next_key()
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-05-27T09:24:36.561Z

Reserved: 2026-05-13T15:03:33.077Z

Link: CVE-2026-45838

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-05-27T11:16:23.130

Modified: 2026-05-27T11:16:23.130

Link: CVE-2026-45838

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-05-27T11:45:15Z

Weaknesses

No weakness.