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

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

CVE-2026-98284 is a use-after-free flaw in the Linux kernel netlink subsystem affecting lockless readers accessing freed memory. This article covers the technical details, security impact, and remediation.

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

CVE-2026-98284 is a use-after-free vulnerability in the Linux kernel's netlink subsystem. The flaw resides in netlink_realloc_groups(), which calls krealloc() under netlink_table_grab(). When NLGRPSZ(groups) lands in a different kmalloc bucket, the old bitmap is freed immediately while lockless readers may still reference it.

Two readers access nlk->groups and nlk->ngroups without holding the netlink table lock: sk_diag_dump_groups() during rhashtable walks in __netlink_diag_dump(), and netlink_native_seq_show() serving /proc/net/netlink. Both can read a freed buffer, and the diag path can read past the end of the old smaller buffer.

Critical Impact

Lockless netlink readers can dereference a freed nlk->groups bitmap or read past its boundary, leading to kernel memory corruption or disclosure.

Affected Products

  • Linux kernel (netlink subsystem)
  • Distributions shipping affected stable kernel versions prior to the fix commits
  • Systems exposing /proc/net/netlink or NETLINK_SOCK_DIAG to local users

Discovery Timeline

  • 2026-10-06 - CVE-2026-98284 published to NVD
  • 2026-10-06 - Last updated in NVD database

Technical Details for CVE-2026-98284

Vulnerability Analysis

The netlink subsystem maintains a per-socket multicast groups bitmap in nlk->groups sized by nlk->ngroups. When a process grows the bitmap through bind() or setsockopt(), netlink_realloc_groups() invokes krealloc() while holding only netlink_table_grab(). If the new allocation size crosses a kmalloc bucket boundary, krealloc() frees the old buffer synchronously.

Two code paths traverse nlk->groups without taking the netlink table lock. sk_diag_dump_groups() runs under RCU during the hashed socket portion of __netlink_diag_dump(). netlink_native_seq_show() has been lockless since commit 21e4902aea80. Both readers can observe a dangling pointer after the realloc frees the old bitmap.

The diag path compounds the issue by potentially pairing the old (smaller) @groups pointer with the new (larger) @ngroups value. Copying ngroups bits from the smaller buffer into a NETLINK_DIAG_GROUPS attribute produces an out-of-bounds read of adjacent slab memory, leaking kernel state to userspace.

Root Cause

The root cause is unsafe memory reclamation: krealloc() releases the old bitmap immediately while RCU readers may still hold references. The issue parallels the bug previously fixed by commit f773608026ee for bind() and getname(), which missed the diag and procfs readers.

Attack Vector

A local unprivileged user can race a thread that calls bind() or setsockopt() on a netlink socket against another thread reading /proc/net/netlink or issuing NETLINK_SOCK_DIAG dump requests. Successful races yield either a use-after-free or an out-of-bounds read of kernel slab memory.

The fix allocates a fresh bitmap, publishes @groups before @ngroups with release semantics, and defers freeing the old bitmap via kfree_rcu_mightsleep() after releasing the table. Lockless readers load @ngroups first so they never pair a new size with the old buffer.

Detection Methods for CVE-2026-98284

Indicators of Compromise

  • Unexpected KASAN use-after-free or slab-out-of-bounds reports referencing netlink_realloc_groups, sk_diag_dump_groups, or netlink_native_seq_show in kernel logs
  • Kernel oops or panic traces originating in the netlink diag or procfs code paths
  • Processes repeatedly opening netlink sockets and racing bind()/setsockopt() with /proc/net/netlink reads or NETLINK_SOCK_DIAG queries

Detection Strategies

  • Enable KASAN on test and canary systems to catch the use-after-free and out-of-bounds read patterns at runtime
  • Review auditd records for unusual AF_NETLINK socket activity correlated with /proc/net/netlink reads from non-administrative users
  • Monitor for kernel ring buffer messages containing netlink combined with BUG, WARNING, or general protection fault

Monitoring Recommendations

  • Collect dmesg and /var/log/kern.log output centrally and alert on netlink-related fault signatures
  • Track installed kernel package versions across the fleet and flag hosts still running pre-patch builds
  • Audit workloads that grant CAP_NET_ADMIN or expose netlink diag interfaces to untrusted tenants

How to Mitigate CVE-2026-98284

Immediate Actions Required

  • Apply the upstream Linux stable kernel updates containing the two fix commits as soon as distribution packages are available
  • Reboot affected hosts after updating the kernel package to activate the patched netlink code
  • Prioritize patching multi-tenant hosts, container nodes, and systems with untrusted local users

Patch Information

The fix is split across two commits: Kernel Git Commit 22f313e and Kernel Git Commit ceac0de. The patches allocate a new bitmap, publish @groups and @ngroups with release semantics, and defer freeing the old bitmap through kfree_rcu_mightsleep() once netlink_table_ungrab() has executed.

Workarounds

  • Restrict access to /proc/net/netlink by tightening hidepid mount options on /proc where feasible
  • Limit NETLINK_SOCK_DIAG exposure by denying CAP_NET_ADMIN and dropping unnecessary netlink families via seccomp or LSM policies
  • Reduce exposure in container environments by masking /proc/net/netlink in container runtime configurations

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.