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

bpf: Preserve special fields in recycled rhtab elements

rhtab_map_update_elem() initializes special fields after obtaining an
element from bpf_mem_cache_alloc(). The allocator can return a fresh,
zeroed unit, or recycle one from its RCU-pending lists before the
registered destructor has run.

A BPF program can retain a map-value pointer after deleting its element
and initialize and arm a timer through that pointer. If the deleted unit
is recycled, check_and_init_map_value() clears the only pointer to the
timer. Neither a later deletion nor rhtab_mem_dtor() can then cancel it,
and the callback can run with its key and value pointing into freed memory.

Do not reinitialize special fields on insertion. Fresh allocator units are
already zeroed. For recycled units, the special fields are ownership state
that must remain visible to the eventual destructor. copy_map_value()
already skips those fields, matching the non-preallocated hash-map path and
the lifecycle established by commit 275c30bcee66 ("bpf: Don't reinit map
value in prealloc_lru_pop").

[ kkd: Split out the fix and rewrote the commit log ]
Published: 2026-09-25
Score: n/a
EPSS: n/a
KEV: No
Impact: Arbitrary Code Execution
Action: Patch Now
AI Analysis

Impact

The vulnerability is a use‑after‑free flaw in the Linux kernel’s BPF subsystem. When a BPF program deletes a map element, it may keep a pointer to the freed value and use that pointer to arm a timer. If the freed unit is recycled from the memory cache, the destructor clears the timer pointer, so a later callback runs with the key and value pointing into deallocated memory, potentially allowing arbitrary code execution or a crash.

Affected Systems

All Linux kernel releases that include the BPF rhtab_map_update_elem implementation prior to the commit that fixed this issue are affected. The flaw exists in the kernel’s map handling for BPF programs and applies to the Linux kernel product in general, regardless of vendor distribution.

Risk and Exploitability

The bug can be exploited by an attacker able to load custom BPF code with kernel privileges, which is typically possible only by a privileged user or compromised system. No public exploit is known and the advisory lists the issue as resolved, but the potential impact of a use‑after‑free in kernel code is high. Because the EPSS score is unavailable and the vulnerability is not listed in CISA’s KEV catalog, the precise likelihood of exploitation is uncertain, though the severity of the flaw suggests caution.

Generated by OpenCVE AI on September 25, 2026 at 15:02 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade to a kernel version that contains the fix introduced by commit 275c30bcee66 or apply the corresponding patch to your current kernel
  • Configure the system to restrict BPF program loading strictly to trusted users, for example via AppArmor, SELinux, or user‑group restrictions
  • If an update is not possible, consider disabling BPF entirely by setting /proc/sys/kernel/bpf_disabled to 1 or analogous kernel parameter

Generated by OpenCVE AI on September 25, 2026 at 15:02 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 25 Sep 2026 15:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-416

Fri, 25 Sep 2026 10:30:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: bpf: Preserve special fields in recycled rhtab elements rhtab_map_update_elem() initializes special fields after obtaining an element from bpf_mem_cache_alloc(). The allocator can return a fresh, zeroed unit, or recycle one from its RCU-pending lists before the registered destructor has run. A BPF program can retain a map-value pointer after deleting its element and initialize and arm a timer through that pointer. If the deleted unit is recycled, check_and_init_map_value() clears the only pointer to the timer. Neither a later deletion nor rhtab_mem_dtor() can then cancel it, and the callback can run with its key and value pointing into freed memory. Do not reinitialize special fields on insertion. Fresh allocator units are already zeroed. For recycled units, the special fields are ownership state that must remain visible to the eventual destructor. copy_map_value() already skips those fields, matching the non-preallocated hash-map path and the lifecycle established by commit 275c30bcee66 ("bpf: Don't reinit map value in prealloc_lru_pop"). [ kkd: Split out the fix and rewrote the commit log ]
Title bpf: Preserve special fields in recycled rhtab elements
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-25T10:23:50.530Z

Reserved: 2026-09-25T10:19:56.071Z

Link: CVE-2026-98036

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-09-25T11:17:32.340

Modified: 2026-09-25T11:17:32.340

Link: CVE-2026-98036

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-25T15:15:14Z

Weaknesses