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

CVE-2026-46018: Linux Kernel Buffer Overflow Vulnerability

CVE-2026-46018 is a buffer overflow flaw in the Linux kernel's ALSA USB audio driver that affects UAC2 sample rate parsing. This vulnerability could allow malformed responses to cause system issues. This article covers technical details, affected versions, impact assessment, and mitigation strategies.

Published:

CVE-2026-46018 Overview

CVE-2026-46018 affects the Linux kernel's Advanced Linux Sound Architecture (ALSA) USB-audio driver. The flaw resides in parse_uac2_sample_rate_range(), which handles USB Audio Class 2 (UAC2) sample rate enumeration. When a USB audio device returns a malformed RANGE response with more triplets than MAX_NR_RATES, the parser breaks out of the inner rate loop but continues processing remaining triplets. This causes repeated "invalid uac2 rates" log entries while register_mutex is held during device probe.

Critical Impact

A malicious or malformed USB audio device can trigger excessive kernel log spam and prolonged mutex contention during probe, degrading audio subsystem availability.

Affected Products

  • Linux kernel mainline branches containing the ALSA usb-audio UAC2 rate parser
  • Stable kernel trees referenced by upstream fix commits 3c318f97, 4d7893a1, a0b78639, ab5ba9fd, and ba036305
  • Systems exposing USB ports to untrusted audio peripherals

Discovery Timeline

  • 2026-05-27 - CVE-2026-46018 published to NVD
  • 2026-05-27 - Last updated in NVD database

Technical Details for CVE-2026-46018

Vulnerability Analysis

The defect lies in how parse_uac2_sample_rate_range() enforces the MAX_NR_RATES cap. The function increments a counter as it walks each rate triplet returned in a UAC2 RANGE descriptor. When the cap is reached, the code only exits the current rate enumeration loop. Outer iteration over remaining triplets continues, and each subsequent malformed triplet logs "invalid uac2 rates" to the kernel ring buffer.

Because probe holds register_mutex for the duration of device initialization, other ALSA registration operations stall while the parser exhausts the malformed descriptor. The condition qualifies as a denial-of-service through resource exhaustion against the audio subsystem and the kernel logging path.

Root Cause

The root cause is incomplete loop termination logic in the UAC2 rate parser. The MAX_NR_RATES boundary check breaks only the innermost loop instead of returning the rate count accumulated so far. The fix terminates the entire parse once the cap is reached and returns the collected count, preventing further triplet processing and log flooding.

Attack Vector

Exploitation requires the attacker to present a crafted USB audio device, either through physical access or through a compromised USB peripheral. When the device is enumerated, the malicious UAC2 RANGE response triggers the parser path. No authentication is required because USB device enumeration runs automatically under kernel context. The impact is local to the host receiving the USB device.

No verified public exploit code is available. The technical details are documented in the upstream kernel stable commits. See the Kernel Git Commit ba036305 for the canonical fix and surrounding context.

Detection Methods for CVE-2026-46018

Indicators of Compromise

  • Repeated "invalid uac2 rates" messages in dmesg or /var/log/kern.log following USB audio device insertion
  • Stalled or delayed ALSA device registration visible via aplay -l or arecord -l returning slowly
  • Unusual USB audio devices appearing in lsusb output that report excessive sample rate triplets

Detection Strategies

  • Monitor kernel logs for bursts of identical "invalid uac2 rates" entries correlated with USB hotplug events
  • Audit USB device descriptors using lsusb -v and flag UAC2 devices whose RANGE responses exceed expected triplet counts
  • Track register_mutex contention through kernel tracing tools such as ftrace or perf lock during audio subsystem probes

Monitoring Recommendations

  • Enable kernel log forwarding to a centralized log pipeline and alert on high-frequency ALSA error patterns
  • Apply USB device control policies through udev rules or USBGuard to restrict unknown audio peripherals
  • Review host telemetry for repeated kernel ring buffer flooding tied to peripheral enumeration

How to Mitigate CVE-2026-46018

Immediate Actions Required

  • Apply the upstream stable kernel patches referenced by commits 3c318f97, 4d7893a1, a0b78639, ab5ba9fd, and ba036305
  • Restrict physical USB access on systems handling sensitive workloads to prevent rogue peripheral attachment
  • Deploy USB device authorization policies that block unknown audio class devices by default

Patch Information

The fix changes parse_uac2_sample_rate_range() to stop the entire parse once MAX_NR_RATES is reached and return the number of rates collected. The corrected behavior eliminates both the log flood and the prolonged register_mutex hold. Patches are merged across multiple stable branches. See the Kernel Git Commit 3c318f97 and the Kernel Git Commit 4d7893a1 for backport details.

Workarounds

  • Disable the snd-usb-audio module on systems that do not require USB audio: modprobe -r snd_usb_audio and blacklist the module
  • Enforce USB authorization defaults by setting /sys/bus/usb/devices/usbN/authorized_default to 0 and authorizing only trusted devices
  • Configure udev rules to reject USB audio class devices (bInterfaceClass=01) from untrusted vendor IDs
bash
# Configuration example: block USB audio class by default via udev
# /etc/udev/rules.d/99-block-usb-audio.rules
SUBSYSTEM=="usb", ATTR{bInterfaceClass}=="01", ATTR{authorized}="0"

# Blacklist the snd-usb-audio module
echo "blacklist snd_usb_audio" | sudo tee /etc/modprobe.d/blacklist-snd-usb-audio.conf
sudo update-initramfs -u

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

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.