Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-98033 Overview
CVE-2026-98033 is a use-after-free vulnerability in the Linux kernel's Berkeley Packet Filter (BPF) subsystem. The flaw affects callback frame construction for bpf_for_each_map_elem(), timer, workqueue, and task-work callbacks. The verifier clears the map_uid field when restoring map_ptr in map-typed argument registers, erasing the only field that distinguishes inner maps sharing the same inner_map_meta template.
The runtime pairs timers with the wrong inner map and stores references without proper tracking. Freeing one map leaves dangling timers in another, triggering a use-after-free when the callback later fires.
Critical Impact
A local attacker loading crafted BPF programs can trigger a kernel use-after-free, enabling potential privilege escalation or denial of service.
Affected Products
- Linux kernel versions containing the vulnerable BPF verifier callback frame logic
- Distributions shipping the affected mainline and stable kernel branches
- Systems permitting unprivileged or privileged BPF program loading
Discovery Timeline
- 2026-09-25 - CVE-2026-98033 published to NVD
- 2026-09-25 - Last updated in NVD database
Technical Details for CVE-2026-98033
Vulnerability Analysis
The vulnerability resides in the BPF verifier's handling of callback frame constructors. When the verifier builds argument registers for callbacks such as bpf_for_each_map_elem(), it calls __mark_reg_known_zero() on the map-typed register before restoring map_ptr. This sequence clears map_uid, the field that uniquely identifies inner map instances derived from the same inner_map_meta template.
Two distinct inner maps then appear identical to the verifier. When a timer callback registered on one inner map invokes bpf_for_each_map_elem() over a second inner map, the nested callback receives both maps as the same template with map_uid of zero. The bpf_timer_init() helper accepts this mismatched pairing without rejection.
The runtime records the first map in the timer structure without taking a reference count. When userspace or garbage collection frees that map, the timer stored inside the second map remains unaccounted. A subsequent timer callback dereferences freed memory, producing a classic use-after-free in kernel context.
Root Cause
The root cause is the loss of inner map identity during verifier state construction for callback frames. Preserving map_ptr without preserving map_uid defeats the verifier's existing identity check, allowing semantically distinct inner maps to be treated as interchangeable.
Attack Vector
Exploitation requires the ability to load a BPF program that uses maps-in-maps with timer or iteration callbacks. The attacker crafts nested callbacks that intentionally pair a timer from one inner map with iteration over another. Triggering the free of the first map while the timer remains armed produces the use-after-free condition. See the upstream commit and the follow-up stable commit for implementation details.
Detection Methods for CVE-2026-98033
Indicators of Compromise
- Kernel oops or panic messages referencing bpf_timer, bpf_for_each_map_elem, or inner_map_meta call stacks
- KASAN use-after-free reports pointing to freed BPF map objects dereferenced from timer callbacks
- Unexpected process termination or kernel instability following BPF program loads from non-root namespaces
Detection Strategies
- Audit BPF program loads via bpf() syscall telemetry, focusing on programs that use map-in-map constructs combined with timer or workqueue helpers
- Enable kernel address sanitizer (KASAN) in test environments to surface use-after-free conditions during BPF stress testing
- Correlate BPF_PROG_LOAD events with subsequent kernel error logs to identify programs triggering verifier edge cases
Monitoring Recommendations
- Collect /sys/kernel/debug/tracing and dmesg output for kernel warnings referencing BPF subsystem functions
- Monitor process capabilities, specifically CAP_BPF and CAP_SYS_ADMIN grants, across workloads
- Alert on repeated BPF program verification failures from the same user or container that may precede a successful exploit attempt
How to Mitigate CVE-2026-98033
Immediate Actions Required
- Apply the upstream Linux kernel patches that copy map_uid from the caller register when constructing callback arguments
- Restrict BPF program loading to trusted administrators by removing CAP_BPF from unprivileged users and containers
- Set kernel.unprivileged_bpf_disabled=1 to prevent unprivileged BPF program loads where supported
Patch Information
The fix is available in the Linux kernel stable tree. The patch copies map_uid from the same caller register as map_ptr when constructing arguments for for-each, timer/workqueue, and task-work callbacks. Reference commits: 66ff2eff093d and b90c5d770dad. Administrators should upgrade to the next stable kernel release incorporating these commits for their distribution.
Workarounds
- Disable unprivileged BPF via sysctl until the patched kernel is deployed
- Enforce seccomp or Linux Security Module (LSM) policies that block the bpf() syscall for untrusted workloads
- Avoid deploying BPF programs that combine maps-in-maps with timer or iteration callbacks on unpatched kernels
# Configuration example: disable unprivileged BPF program loading
sysctl -w kernel.unprivileged_bpf_disabled=1
echo 'kernel.unprivileged_bpf_disabled=1' | sudo tee /etc/sysctl.d/90-bpf-hardening.conf
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

