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

CVE-2026-97985: Linux Kernel AF_UNIX Socket DoS Vulnerability

CVE-2026-97985 is a denial of service flaw in the Linux kernel's AF_UNIX socket implementation that causes CPU hogging during blocking recv operations with MSG_PEEK. This article covers technical details, impact analysis, 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-97985 Overview

CVE-2026-97985 is a Linux kernel vulnerability in the af_unix subsystem. The flaw affects how manage_oob() handles the last socket buffer (skb) marker when processing out-of-band (OOB) data on UNIX domain stream sockets. A blocking recv(MSG_PEEK) call can busy-wait and hog CPU after manage_oob() skips OOB skbs and returns NULL. The condition is triggered through legitimate socket APIs on AF_UNIX/SOCK_STREAM socket pairs, making it a local denial of service issue reachable by unprivileged users.

Critical Impact

An unprivileged local process can trigger a tight CPU-bound busy-wait loop in unix_stream_data_wait(), causing resource exhaustion on the affected system.

Affected Products

  • Linux kernel (upstream) af_unix implementation
  • Stable kernel branches referenced by commits 0630bfc, 94fd4de, f1816b3, and fc62a26
  • Distributions shipping unpatched versions of the affected af_unix code

Discovery Timeline

  • 2026-09-25 - CVE-2026-97985 published to NVD
  • 2026-09-25 - Last updated in NVD database

Technical Details for CVE-2026-97985

Vulnerability Analysis

The vulnerability resides in the UNIX domain socket (AF_UNIX) receive path. When a caller issues recv(MSG_PEEK) on a stream socket that contains OOB data, manage_oob() skips OOB skbs and may return NULL for the last skb. In this condition, unix_stream_read_generic() observes copied == 0 and invokes unix_stream_data_wait() to block for new data.

The wait function returns immediately because the @last pointer passed into it was not refreshed by manage_oob(). The receive loop then re-enters the same path, producing a tight busy-wait that consumes a full CPU core until an external event (such as a signal or new skb arrival) breaks the cycle. This behavior is a denial of service primitive reachable from any process able to open a UNIX socket pair.

Root Cause

The root cause is a stale skb marker. unix_stream_data_wait() compares against @last to decide whether the receive queue state has changed. Because manage_oob() skipped past one or more OOB skbs without updating @last, the wait helper treats the queue as already advanced and returns without blocking. The upstream fix updates @last inside manage_oob() so that for MSG_PEEK it reflects the skipped OOB skb, and for the non-peek case it matches the returned value when nothing was copied.

Attack Vector

The attack vector is local. A low-privileged user creates a UNIX socket pair, sends one or two bytes with MSG_OOB, and then issues a zero-length or specifically sized recv(MSG_PEEK). Three reproducer sequences are described upstream:

  • send(... MSG_OOB) followed by recv(..., 0, MSG_PEEK) on a queue of skb -> OOB skb -> NULL.
  • send(... MSG_OOB), consume the OOB byte, then recv(..., 0, MSG_PEEK).
  • Interleaved OOB sends and consumes producing consumed OOB skb -> OOB skb -> NULL, followed by recv(..., 1, MSG_PEEK).

Each sequence drives copied to zero inside unix_stream_read_generic() and triggers the busy-wait. No special privileges, capabilities, or namespaces are required.

See the upstream fix in Linux Kernel Commit 0630bfc and backports 94fd4de, f1816b3, and fc62a26 for technical details.

Detection Methods for CVE-2026-97985

Indicators of Compromise

  • Sustained 100% CPU utilization by a user-space process stuck inside kernel system calls, specifically recvfrom or recvmsg on an AF_UNIX stream socket.
  • Kernel stack traces (via /proc/<pid>/stack or perf) showing repeated entry into unix_stream_read_generic and unix_stream_data_wait without progress.
  • Processes exchanging MSG_OOB data on UNIX socket pairs immediately followed by zero-length MSG_PEEK calls.

Detection Strategies

  • Monitor per-process CPU time and syscall patterns for long-lived recvmsg/recvfrom calls that never return bytes read.
  • Use eBPF or perf to sample on-CPU kernel stacks and alert when unix_stream_data_wait dominates a process's profile.
  • Audit kernel versions against the fixed commits across the fleet to identify unpatched hosts likely to be exposed.

Monitoring Recommendations

  • Baseline normal CPU usage for services that use UNIX domain sockets (databases, container runtimes, systemd units) and alert on sustained spikes.
  • Capture sar, pidstat, or Prometheus node metrics with sufficient resolution to detect single-core saturation.
  • Review Linux audit logs for anomalous local processes consuming CPU without producing output or network traffic.

How to Mitigate CVE-2026-97985

Immediate Actions Required

  • Inventory running kernel versions and identify systems that lack the manage_oob() fix.
  • Apply vendor-supplied stable kernel updates that include commit 0630bfc773d8 or the corresponding backport.
  • Where patching is delayed, restrict untrusted local users and container workloads that can create arbitrary UNIX socket pairs.

Patch Information

The fix updates the @last skb marker inside manage_oob() so unix_stream_data_wait() blocks correctly when copied == 0. Apply the upstream commits: 0630bfc, 94fd4de, f1816b3, and fc62a26. Rebuild and reboot into the patched kernel to activate the fix.

Workarounds

  • Enforce per-process CPU quotas with cgroup v2 (cpu.max) on untrusted workloads to cap the damage from a busy-wait.
  • Reduce exposure by limiting shell access and container escapes that would let an attacker open UNIX socket pairs on sensitive hosts.
  • Monitor and terminate processes that remain in a busy recvmsg state for longer than operational baselines allow.
bash
# Example: cap a suspect service to a single CPU with cgroup v2
# (adjust slice/service names to your environment)
sudo systemctl set-property my-service.service CPUQuota=100%

# Verify currently running kernel version against the fixed stable release
uname -r

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.