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

CVE-2026-98305: Linux Kernel DSA Driver Privilege Escalation

CVE-2026-98305 is a privilege escalation vulnerability in the Linux kernel DSA mxl862xx driver that can allow attackers to gain elevated privileges through improper stats poll handling. This article covers technical details, impact assessment, 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-98305 Overview

CVE-2026-98305 is a use-after-free vulnerability in the Linux kernel's Distributed Switch Architecture (DSA) driver for Maxlinear mxl862xx switches. The flaw stems from improper lifecycle management of the delayed statistics poll work item. The driver arms the stats poll inside mxl862xx_setup() before mxl862xx_setup_mdio() runs, and nothing cancels it if a later initialization step fails. DSA frees the dsa_port list on error, so the still-queued poll walks freed memory. A related race during shutdown allows a re-armed poll to run after cancel_delayed_work_sync() has returned.

Critical Impact

A local attacker with low privileges can trigger teardown or shutdown paths that lead to kernel memory corruption, affecting confidentiality, integrity, and availability.

Affected Products

  • Linux kernel versions containing the mxl862xx DSA driver prior to the fix commits
  • Systems using Maxlinear mxl862xx Ethernet switches via the DSA subsystem
  • Linux stable branches referenced by the upstream commits 97df811a11d4 and 9e92ad4630f5

Discovery Timeline

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

Technical Details for CVE-2026-98305

Vulnerability Analysis

The mxl862xx DSA driver schedules a delayed work item (the stats poll) early in mxl862xx_setup(). If mxl862xx_setup_mdio() or any subsequent step inside dsa_tree_setup() fails, DSA returns the error to mxl862xx_probe() and frees the dsa_port list without stopping the already-armed poll. When the poll later fires, it dereferences freed port structures, producing a use-after-free in kernel context.

A second defect appears on module shutdown. User ports remain registered, and the WORK_STOPPED flag check inside mxl862xx_get_stats64() is not atomic with the cancel operation in mxl862xx_shutdown(). A caller that read the flag before it was set can re-arm the delayed work after cancel_delayed_work_sync() has already returned, resurrecting the poll against torn-down state.

The upstream fix arms the poll only after .setup succeeds and stops it from a .teardown operation that DSA invokes on both unregister and failed registration. The patch replaces cancel_delayed_work_sync() with disable_delayed_work_sync(), which drains any running poll and converts subsequent queue attempts into no-ops.

Root Cause

The root cause is a lifecycle mismatch between the delayed work item and the DSA switch registration state machine, combined with a non-atomic flag check that permits a time-of-check to time-of-use (TOCTOU) race between the stats getter and the shutdown handler.

Attack Vector

Exploitation requires local access with low privileges. Triggering a probe failure or a shutdown while stats are being queried causes the kernel to execute the stats poll against freed dsa_port memory, enabling denial of service or potential privilege escalation through controlled heap manipulation.

No public proof-of-concept code is available. See the kernel commit at git.kernel.org commit 97df811a11d4 and the companion patch at git.kernel.org commit 9e92ad4630f5 for the authoritative change.

Detection Methods for CVE-2026-98305

Indicators of Compromise

  • Kernel oops or panic messages referencing mxl862xx_get_stats64, crc_err_work, or dsa_port after module probe failure or shutdown
  • KASAN use-after-free reports pointing to the mxl862xx driver stats poll callback
  • Repeated DSA switch registration failures followed by unexpected kernel crashes on systems with Maxlinear switches

Detection Strategies

  • Enable CONFIG_KASAN on test kernels to surface use-after-free access in the mxl862xx stats poll path
  • Monitor dmesg and system journals for stack traces referencing DSA teardown followed by delayed work execution
  • Audit loaded kernel modules against the fixed commit hashes 97df811a11d4 and 9e92ad4630f5

Monitoring Recommendations

  • Collect kernel crash dumps and ring buffer output centrally to catch intermittent use-after-free panics on affected hardware
  • Track module load, unload, and probe-failure events for the mxl862xx driver through audit logs
  • Alert on repeated DSA switch probe failures that precede unexplained reboots or kernel exceptions

How to Mitigate CVE-2026-98305

Immediate Actions Required

  • Apply the upstream Linux kernel patches identified by commits 97df811a11d4 and 9e92ad4630f5 to all affected systems
  • Rebuild and redeploy custom kernels that include the mxl862xx DSA driver using a patched source tree
  • Restrict local access to systems with Maxlinear mxl862xx switches until the fix is deployed

Patch Information

The fix arms the stats poll only after .setup succeeds, stops it from a new .teardown operation, and replaces cancel_delayed_work_sync() with disable_delayed_work_sync() so that late re-arms become no-ops. Review the authoritative patches at git.kernel.org commit 97df811a11d4 and git.kernel.org commit 9e92ad4630f5. Distribution-provided stable kernel updates should be preferred where available.

Workarounds

  • Avoid unloading or reloading the mxl862xx DSA driver on production systems until patched kernels are deployed
  • Blacklist the mxl862xx module on hosts that do not require the Maxlinear switch functionality
  • Limit shell and container access on affected hosts to reduce the local attack surface
bash
# Blacklist the mxl862xx module until a patched kernel is installed
echo "blacklist mxl862xx" | sudo tee /etc/modprobe.d/blacklist-mxl862xx.conf
sudo update-initramfs -u

# Verify the running kernel after patching
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.