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

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

CVE-2026-98795 is a use-after-free flaw in the Linux kernel's sparx5 network driver that causes NULL pointer dereference during cleanup. This post explains its technical details, affected versions, and mitigation.

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

CVE-2026-98795 is a NULL pointer dereference vulnerability in the Linux kernel's Microchip Sparx5 Ethernet switch driver. The flaw resides in the Precision Time Protocol (PTP) teardown path within sparx5_ptp_deinit(). When the driver is unbound on hardware variants that lack the SPX5_FEATURE_PTP flag (base lan969x platforms) or when no ptp interrupt is described in the device tree, PTP initialization is skipped. Removing the driver afterward attempts to purge uninitialized tx_skbs queues, triggering a kernel oops.

Critical Impact

Unbinding the sparx5 driver on affected lan969x hardware triggers a kernel NULL pointer dereference, resulting in a denial of service condition on the switch.

Affected Products

  • Linux kernel net/ethernet/microchip/sparx5 driver
  • Microchip lan969x base variants without SPX5_FEATURE_PTP
  • Sparx5 platforms where no ptp interrupt is described in the device tree

Discovery Timeline

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

Technical Details for CVE-2026-98795

Vulnerability Analysis

The Sparx5 Ethernet switch driver implements PTP support through paired sparx5_ptp_init() and sparx5_ptp_deinit() functions. The initialization routine returns early under two documented conditions: when the hardware does not advertise the SPX5_FEATURE_PTP capability flag, and when the device tree does not describe a ptp interrupt. On base lan969x variants, both conditions typically apply.

The teardown path did not mirror this early-exit logic. When an administrator unbinds the driver, sparx5_ptp_deinit() executes unconditionally and calls skb_queue_purge_reason() on per-port tx_skbs queues that were never initialized. The function dereferences a NULL pointer at offset 0x8, generating the kernel oops shown in the upstream report.

Before the per-port tx_skbs queues were introduced, the same code path would have called ptp_clock_unregister() on PTP clock handles that were never registered, producing an equivalent NULL dereference. The fix adds the symmetric early-return guard to sparx5_ptp_deinit().

Root Cause

The root cause is asymmetric initialization and teardown logic. sparx5_ptp_init() validates feature flags and interrupt availability before setting up queues and registering PTP clocks, but sparx5_ptp_deinit() assumed initialization had completed. This Null Pointer Dereference [CWE-476] in the kernel driver is triggered during the device removal workflow.

Attack Vector

Triggering the vulnerability requires local privileges sufficient to unbind the kernel driver, typically through sysfs paths such as /sys/bus/platform/drivers/mchp_sparx5/unbind. The flaw is not remotely reachable and primarily results in a kernel crash, affecting availability on embedded networking hardware that uses the Sparx5 driver. See the upstream commits for implementation details: Kernel commit 35c706d, Kernel commit 2879b65, and Kernel commit 0d2c499.

Detection Methods for CVE-2026-98795

Indicators of Compromise

  • Kernel oops messages referencing skb_queue_purge_reason followed by sparx5_ptp_deinit and mchp_sparx5_remove in call traces.
  • Unable to handle kernel NULL pointer dereference at virtual address 0000000000000008 entries in dmesg or syslog on lan969x hardware.
  • Unexpected switch reboots or interface loss following driver unbind or module reload operations.

Detection Strategies

  • Monitor kernel ring buffer output on Sparx5 and lan969x devices for NULL dereference traces matching the signature above.
  • Audit running kernel versions against the fixed commits referenced in the upstream advisory to identify unpatched systems.
  • Track platform_remove and device_remove events on embedded networking equipment through host telemetry pipelines.

Monitoring Recommendations

  • Forward kernel logs from embedded networking appliances to a centralized logging platform for correlation and alerting.
  • Alert on repeated driver unbind operations against mchp_sparx5 platform drivers.
  • Baseline normal device removal activity so unexpected teardown events are flagged for review.

How to Mitigate CVE-2026-98795

Immediate Actions Required

  • Apply the upstream Linux kernel patches that add the early-return check to sparx5_ptp_deinit().
  • Restrict administrative access to sysfs driver unbind interfaces on affected hardware.
  • Avoid unbinding or reloading the mchp_sparx5 driver on lan969x variants until the fix is deployed.

Patch Information

The fix is available in upstream Linux kernel commits 35c706d, 2879b65, and 0d2c499. Operators of lan969x and Sparx5-based hardware should rebase to a stable kernel release containing these commits or backport the change into vendor kernels.

Workarounds

  • Do not unbind or remove the mchp_sparx5 platform driver on systems lacking the SPX5_FEATURE_PTP flag.
  • Limit root access on affected devices to reduce the risk of accidental or deliberate driver teardown.
  • Where feasible, reboot rather than unbind the driver to clear switch state until the patched kernel is installed.

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.