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-98565 Overview
CVE-2026-98565 is a NULL pointer dereference vulnerability in the Linux kernel's net/dsa/mt7530 distributed switch architecture driver. The flaw affects systems using MT7531 or MT7621 switch variants. The mt7530_remove() function unconditionally calls regulator_disable() on the core and io supplies, but these regulators are only acquired during probe when the switch ID matches ID_MT7530. On MT7531 and MT7621 hardware both regulator pointers remain NULL from the initial devm_kzalloc() allocation. Triggering rmmod or a sysfs unbind causes the kernel to dereference a NULL pointer during teardown.
Critical Impact
Local users with sufficient privileges to unload or unbind the mt7530 driver can trigger a kernel NULL pointer dereference, resulting in a denial-of-service kernel oops on affected MediaTek switch platforms.
Affected Products
- Linux kernel net/dsa/mt7530 driver on MT7531 switch hardware
- Linux kernel net/dsa/mt7530 driver on MT7621 switch hardware
- Stable branches referenced by commits 62c0e38b, aae2a1f1, bd172580, c2cdef41, and e9a52985
Discovery Timeline
- 2026-10-18 - CVE-2026-98565 published to NVD
- 2026-10-19 - Last updated in NVD database
Technical Details for CVE-2026-98565
Vulnerability Analysis
The mt7530 driver supports multiple MediaTek switch variants through a shared code path. During probe, the driver uses devm_regulator_get() to acquire the core and io supplies only when the device matches ID_MT7530. Similarly, mt7530_setup() guards regulator_enable() calls behind the same switch ID check. The teardown path in mt7530_remove() lacks the corresponding guard and invokes regulator_disable() unconditionally. On MT7531 and MT7621 platforms, the regulator pointers were never populated and retain their zero-initialized state from devm_kzalloc(). The resulting NULL dereference occurs in kernel context during module removal or sysfs unbind, causing a kernel oops [CWE-476].
Root Cause
The root cause is asymmetric handling of optional resources between the probe and remove paths. The acquisition path correctly conditions regulator access on hardware variant, while the removal path assumes all variants populate the same fields. This violates the invariant that teardown logic must mirror the conditions under which resources are acquired.
Attack Vector
Exploitation requires local access with privileges sufficient to invoke rmmod on the mt7530 module or write to the driver's sysfs unbind attribute. Typically this requires CAP_SYS_MODULE or root. The vulnerability does not provide code execution or privilege escalation. The impact is a kernel oops that may destabilize the system or trigger a panic depending on kernel configuration such as panic_on_oops. See the upstream fix commits linked under References for the exact source changes.
Detection Methods for CVE-2026-98565
Indicators of Compromise
- Kernel oops messages referencing regulator_disable in the call stack during mt7530 module unload or device unbind events
- dmesg entries containing BUG: kernel NULL pointer dereference originating from the mt7530_remove function path
- Unexpected driver unload events on embedded devices or routers using MT7531 or MT7621 switch silicon
Detection Strategies
- Audit kernel version strings against the fixed stable branches listed in the upstream commits 62c0e38b, aae2a1f1, bd172580, c2cdef41, and e9a52985
- Monitor kernel crash telemetry and kdump collections for oops signatures involving the DSA mt7530 driver
- Correlate module load and unload events with subsequent kernel log anomalies on MediaTek-based network appliances
Monitoring Recommendations
- Forward dmesg and /var/log/kern.log output to a centralized logging system to flag kernel oops and NULL dereference events
- Alert on rmmod mt7530 or sysfs writes to /sys/bus/platform/drivers/mt7530/unbind on production systems
- Track kernel package versions across embedded Linux fleets to confirm the fix is deployed on affected devices
How to Mitigate CVE-2026-98565
Immediate Actions Required
- Apply the upstream kernel patches referenced by commits 62c0e38b2e50, aae2a1f1e3a0, bd172580e624, c2cdef41e0b4, and e9a5298532780 to any kernel tree shipping the mt7530 DSA driver
- Restrict CAP_SYS_MODULE and root shell access on devices using MT7531 or MT7621 switch hardware to limit who can unload the driver
- Avoid unloading or unbinding the mt7530 driver on unpatched systems until the fix is deployed
Patch Information
The fix adds the missing switch ID guard around the regulator_disable() calls in mt7530_remove(), mirroring the existing checks in probe and setup. Patches have been merged into the mainline Linux kernel and backported to stable branches. Refer to the following commits for the applied source changes: Kernel Commit 62c0e38, Kernel Commit aae2a1f1, Kernel Commit bd172580, Kernel Commit c2cdef41, and Kernel Commit e9a52985.
Workarounds
- Blacklist the ability to unload the mt7530 module by removing module unload support from the kernel configuration where feasible
- Enforce strict access controls to prevent unprivileged processes from invoking driver unbind operations on affected hardware
- Keep the mt7530 driver statically compiled into the kernel to eliminate rmmod as an attack path on embedded builds
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

