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

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

CVE-2026-97963 is a use-after-free flaw in the Linux kernel stmmac network driver affecting PTP lock initialization. This vulnerability can lead to undefined behavior when accessing uninitialized locks. This post explains its technical details, affected versions, impact, and mitigation steps.

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

CVE-2026-97963 is a Linux kernel vulnerability in the stmmac network driver. The driver fails to initialize priv->ptp_lock until the network interface is opened. However, the lock can be accessed before the interface has ever been opened, resulting in use of an uninitialized rwlock. Using an uninitialized synchronization primitive constitutes undefined behavior in the kernel.

The issue surfaces when tc_taprio_configure() offloads a Time-Aware Priority Shaper (TAPRIO) schedule on a down interface. The function invokes the Precision Time Protocol (PTP) gettime64() callback to compute the Enhanced Scheduled Traffic (EST) base time, which calls stmmac_get_time() and acquires priv->ptp_lock.

Critical Impact

Uninitialized rwlock use in the stmmac driver can produce undefined behavior, including kernel instability, when a TAPRIO schedule is configured on an interface that has never been opened.

Affected Products

  • Linux kernel versions containing the stmmac driver with TAPRIO offload support prior to the fix commits
  • Systems using STMicroelectronics MAC Ethernet controllers (stmmac) with PTP and TAPRIO queueing discipline
  • Embedded and networking platforms relying on stmmac for time-sensitive networking

Discovery Timeline

  • 2026-09-25 - CVE-2026-97963 published to the National Vulnerability Database (NVD)
  • 2026-09-25 - Last updated in NVD database

Technical Details for CVE-2026-97963

Vulnerability Analysis

The vulnerability resides in the drivers/net/ethernet/stmicro/stmmac subsystem of the Linux kernel. The priv->ptp_lock reader-writer lock protects access to PTP hardware clock state. Initialization occurs inside stmmac_ptp_register(), which executes as part of __stmmac_open() when the interface transitions to the up state.

User space can offload a TAPRIO schedule before the interface is ever brought up. In that path, tc_taprio_configure() calls the PTP gettime64() callback to derive the EST base time. The callback leads to stmmac_get_time(), which attempts to take priv->ptp_lock. Because the lock has never been initialized, the kernel operates on uninitialized memory used for synchronization state.

Root Cause

The root cause is incorrect placement of lock initialization relative to the lock's usage lifecycle. rwlock_init() for priv->ptp_lock lives in the interface-up path (stmmac_ptp_register() via __stmmac_open()), but the lock is reachable through control-plane operations that do not require the interface to be up. The fix moves rwlock_init(&priv->ptp_lock) into __stmmac_dvr_probe() so initialization occurs at driver probe time, alongside other private locks, guaranteeing a valid lock across all interface states.

Attack Vector

Triggering the condition requires local privileges sufficient to configure traffic control (tc) qdiscs, typically CAP_NET_ADMIN. An administrator or privileged process can offload a TAPRIO schedule to a stmmac-backed interface that has not been opened. The resulting undefined behavior from uninitialized rwlock access can lead to kernel instability or memory corruption of adjacent fields. The vulnerability does not describe a remote attack path and is not listed in CISA's Known Exploited Vulnerabilities catalog.

The fix is published across multiple stable kernel trees. Refer to Kernel Git Commit 0338c68, Kernel Git Commit 25cc009, Kernel Git Commit 4203154, and Kernel Git Commit b198659 for the upstream patches.

Detection Methods for CVE-2026-97963

Indicators of Compromise

  • Kernel log messages referencing lock debugging errors, BUG: spinlock, or BUG: rwlock originating from stmmac_get_time or tc_taprio_configure call paths.
  • Unexpected kernel panics or soft lockups on hosts running the stmmac driver after a TAPRIO qdisc change on an interface that has not been administratively brought up.
  • tc qdisc operations configuring taprio with flags 0x2 (hardware offload) on down stmmac interfaces recorded in audit logs.

Detection Strategies

  • Enable kernel lock debugging options (CONFIG_DEBUG_LOCK_ALLOC, CONFIG_PROVE_LOCKING) in test environments to surface uninitialized rwlock use early.
  • Correlate audit logs for tc command execution with interface state transitions reported by netlink to identify risky ordering.
  • Inventory kernel versions across the fleet and flag hosts running stmmac-based NICs on pre-patch builds.

Monitoring Recommendations

  • Forward dmesg and /var/log/kern.log to a centralized logging platform and alert on lockdep splats or WARNING entries from net/sched/sch_taprio.c or drivers/net/ethernet/stmicro/stmmac/.
  • Monitor process execution of tc and ip link with auditd or eBPF-based telemetry to detect configuration sequences that precede the vulnerable path.
  • Track kernel version drift and stmmac module load events across Linux endpoints and embedded systems.

How to Mitigate CVE-2026-97963

Immediate Actions Required

  • Identify all systems running the stmmac driver and inventory the kernel versions in use.
  • Apply the stable kernel update that moves rwlock_init(&priv->ptp_lock) to __stmmac_dvr_probe() as soon as it is available for your distribution.
  • Restrict CAP_NET_ADMIN to trusted administrators and automation accounts to limit who can configure taprio qdiscs.

Patch Information

The fix relocates the rwlock_init() call for priv->ptp_lock from stmmac_ptp_register() to __stmmac_dvr_probe(), ensuring the lock is initialized at driver probe time alongside other private locks. The patch is available in the upstream stable tree via Kernel Git Commit 0338c68, Kernel Git Commit 25cc009, Kernel Git Commit 4203154, and Kernel Git Commit b198659. Consume the fix through your distribution's kernel update channel.

Workarounds

  • Bring the stmmac interface administratively up with ip link set <iface> up before configuring any taprio offload, which forces stmmac_ptp_register() and the rwlock_init() to run first.
  • Avoid configuring hardware-offloaded TAPRIO schedules on stmmac interfaces until the patched kernel is deployed.
  • Limit tc qdisc configuration to orchestration workflows that enforce interface-up ordering as a policy guardrail.
bash
# Ensure stmmac interface is up before applying taprio offload
ip link set eth0 up

# Only then configure the taprio qdisc with hardware offload
tc qdisc replace dev eth0 parent root taprio \
    num_tc 2 \
    map 0 1 \
    queues 1@0 1@1 \
    base-time 0 \
    sched-entry S 01 300000 \
    sched-entry S 02 300000 \
    flags 0x2

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.