CVE-2021-47439: net: dsa: microchip: Added the condition for scheduling ksz_mib_read_work
In the Linux kernel, the following vulnerability has been resolved:
net: dsa: microchip: Added the condition for scheduling ksz_mib_read_work
When the ksz module is installed and removed using rmmod, kernel crashes
with null pointer dereferrence error. During rmmod, ksz_switch_remove
function tries to cancel the mib_read_workqueue using
cancel_delayed_work_sync routine and unregister switch from dsa.
During dsa_unregister_switch it calls ksz_mac_link_down, which in turn
reschedules the workqueue since mib_interval is non-zero.
Due to which queue executed after mib_interval and it tries to access
dp->slave. But the slave is unregistered in the ksz_switch_remove
function. Hence kernel crashes.
To avoid this crash, before canceling the workqueue, resetted the
mib_interval to 0.
v1 -> v2:
-Removed the if condition in ksz_mib_read_work
Security readout for executives and security teams
Plain-English summary
A Linux kernel driver for Microchip KSZ network switches can crash the kernel when the module is removed. This is mainly an availability risk for systems that use this hardware or driver, especially embedded or network devices. The provided sources do not show remote exploitation or active exploitation.
Executive priority
Prioritize patching where KSZ-based network or embedded devices support critical operations. This is not evidenced as internet-exploitable, but a local-triggered kernel crash can still disrupt availability.
Technical view
The KSZ DSA driver can reschedule ksz_mib_read_work during switch unregister because mib_interval remains nonzero. After ksz_switch_remove unregisters the slave interface, the delayed work may still run and dereference dp->slave, causing a kernel null pointer crash. The upstream fix resets mib_interval to zero before canceling the workqueue.
Likely exposure
Exposure is likely limited to Linux systems running affected kernel builds with the Microchip KSZ DSA switch driver in use. The CVSS vector is local, low complexity, low privilege, no user interaction, with high availability impact.
Exploitation context
The source describes crashes during ksz module removal using rmmod. KEV is false, and the bundle provides no evidence of active exploitation, public exploitation, or remote attack paths.
Researcher notes
The evidence points to a teardown ordering bug in the KSZ DSA driver workqueue handling. Affected-version data in the bundle is limited, so validate exposure against actual kernel source, distro patches, and device-vendor kernels.
Mitigation direction
Update to a kernel or vendor package containing the referenced stable fixes.
Check Linux distribution or device-vendor guidance for backported patches.
Avoid unnecessary KSZ module unload or reload operations until patched.
Restrict local access and module-management permissions on affected systems.
Validation and detection
Inventory systems for affected Linux kernel versions and Microchip KSZ DSA driver usage.
Confirm whether the referenced stable commits or vendor backports are present.
Review kernel logs for null pointer crashes during KSZ module removal or switch teardown.
Verify operational runbooks do not unload the KSZ module on unpatched systems.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2021-47439 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.