Skip to main content
Vulnerability Database/CVE-2026-98537

CVE-2026-98537: Linux Kernel Use-After-Free Vulnerability

CVE-2026-98537 is a use-after-free flaw in Linux kernel workqueue causing NULL pointer dereference during flush dependency checks. This article covers technical details, affected versions, impact, and mitigation strategies.

Published:

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-98537 Overview

CVE-2026-98537 is a NULL pointer dereference vulnerability in the Linux kernel workqueue subsystem. The flaw resides in check_flush_dependency(), which dereferences worker->current_pwq without verifying it is non-NULL. A kworker thread can reach this code path while acting as the pool manager and not executing a work item, at which point current_pwq is NULL. The condition is reproducible through the memory reclaim path, where create_worker() performs a GFP_KERNEL allocation that triggers the out-of-memory (OOM) notifier chain and eventually calls flush_work(). The resulting dereference crashes the kernel.

Critical Impact

Local triggering of a NULL pointer dereference in the kernel workqueue code can produce a denial-of-service condition (kernel oops or panic) on affected Linux systems under memory pressure.

Affected Products

  • Linux kernel (upstream) versions containing the pre-patch check_flush_dependency() logic
  • Stable kernel branches referenced in the fix commits 0c6b9b1, 1dccf5d, 513121e, 8ffecec, 9bb739a, cc190a6, db6365c, and f97e6d0
  • Linux distributions shipping unpatched kernels from those stable trees

Discovery Timeline

  • 2026-10-18 - CVE-2026-98537 published to NVD
  • 2026-10-19 - Last updated in NVD database

Technical Details for CVE-2026-98537

Vulnerability Analysis

The workqueue subsystem uses check_flush_dependency() to warn when a flush operation would violate WQ_MEM_RECLAIM ordering guarantees. The function calls current_wq_worker() to determine whether %current is a kernel worker, which only tests the PF_WQ_WORKER flag. It then dereferences worker->current_pwq to inspect the current workqueue. The pointer current_pwq is only populated by process_one_work() and cleared after the work function returns. A kworker that is not executing a work item therefore holds a NULL current_pwq while still satisfying current_wq_worker().

Root Cause

The root cause is a missing NULL check on worker->current_pwq inside check_flush_dependency(). The code assumes any PF_WQ_WORKER task has an active pool workqueue, which is not true for a kworker running as pool manager. [CWE-476] Null Pointer Dereference describes this class of defect.

Attack Vector

The crash path is triggered when worker_thread() acts as pool manager and create_worker() performs a GFP_KERNEL slab allocation. Under memory pressure, the allocation enters __alloc_pages_slowpath() and reaches out_of_memory(), which runs blocking_notifier_call_chain(). A registered OOM notifier calls flush_work(), which calls __flush_work() and then check_flush_dependency(). At that point worker->current_pwq is NULL and the dereference faults. The call trace in the commit log confirms the path through alloc_worker and create_worker into worker_thread.

No verified exploit code is available. The vulnerability is reachable only through legitimate kernel execution under memory pressure and is not a remote attack vector.

Detection Methods for CVE-2026-98537

Indicators of Compromise

  • Kernel oops or panic logs referencing check_flush_dependency+0x80/0x120 in the call trace
  • Preceding frames showing out_of_memory, blocking_notifier_call_chain, and flush_work leading into the fault
  • Stack frames with create_worker and alloc_worker immediately below worker_thread

Detection Strategies

  • Parse dmesg, /var/log/kern.log, and journald output for NULL pointer dereferences inside workqueue functions.
  • Monitor host crash dumps or kdump artifacts for faulting instruction pointers inside check_flush_dependency.
  • Track kernel version inventory across the fleet and flag hosts running kernels that predate the referenced stable fix commits.

Monitoring Recommendations

  • Forward kernel ring buffer events to a centralized logging pipeline for correlation across hosts.
  • Alert on memory pressure events and OOM notifier activations that coincide with kernel faults.
  • Track workqueue health counters exposed through /proc and /sys/kernel/debug/workqueue/ to spot repeated worker creation failures.

How to Mitigate CVE-2026-98537

Immediate Actions Required

  • Apply the upstream fix from the stable tree commits listed in the kernel.org references and rebuild or update affected kernels.
  • Prioritize patching hosts that run memory-intensive workloads where OOM notifiers are likely to fire.
  • Validate kernel package versions against distribution security advisories once vendors backport the fix.

Patch Information

The fix guards the WQ_MEM_RECLAIM-worker warning in check_flush_dependency() with a worker->current_pwq NULL check. The PF_MEMALLOC warning is left intact so explicit reclaim contexts flushing a non-WQ_MEM_RECLAIM target are still reported. Patched kernels are available in the stable commits 0c6b9b1, 1dccf5d, 513121e, 8ffecec, 9bb739a, cc190a6, db6365c, and f97e6d0.

Workarounds

  • Reduce the likelihood of OOM conditions by right-sizing memory limits and tuning vm.overcommit_memory and vm.min_free_kbytes.
  • Avoid loading third-party modules that register OOM notifiers calling into flush_work() on unpatched kernels.
  • Where feasible, enable kdump to capture diagnostics if the fault is triggered before patching completes.
bash
# Verify running kernel version and check for the fix
uname -r
# Example: query distribution package manager for installed kernel updates
# Debian/Ubuntu
apt list --installed 2>/dev/null | grep linux-image
# RHEL/CentOS/Fedora
rpm -qa | grep kernel

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

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.