CVE-2025-21701: net: avoid race between device unregistration and ethnl ops
In the Linux kernel, the following vulnerability has been resolved:
net: avoid race between device unregistration and ethnl ops
The following trace can be seen if a device is being unregistered while
its number of channels are being modified.
DEBUG_LOCKS_WARN_ON(lock->magic != lock)
WARNING: CPU: 3 PID: 3754 at kernel/locking/mutex.c:564 __mutex_lock+0xc8a/0x1120
CPU: 3 UID: 0 PID: 3754 Comm: ethtool Not tainted 6.13.0-rc6+ #771
RIP: 0010:__mutex_lock+0xc8a/0x1120
Call Trace:
<TASK>
ethtool_check_max_channel+0x1ea/0x880
ethnl_set_channels+0x3c3/0xb10
ethnl_default_set_doit+0x306/0x650
genl_family_rcv_msg_doit+0x1e3/0x2c0
genl_rcv_msg+0x432/0x6f0
netlink_rcv_skb+0x13d/0x3b0
genl_rcv+0x28/0x40
netlink_unicast+0x42e/0x720
netlink_sendmsg+0x765/0xc20
__sys_sendto+0x3ac/0x420
__x64_sys_sendto+0xe0/0x1c0
do_syscall_64+0x95/0x180
entry_SYSCALL_64_after_hwframe+0x76/0x7e
This is because unregister_netdevice_many_notify might run before the
rtnl lock section of ethnl operations, eg. set_channels in the above
example. In this example the rss lock would be destroyed by the device
unregistration path before being used again, but in general running
ethnl operations while dismantle has started is not a good idea.
Fix this by denying any operation on devices being unregistered. A check
was already there in ethnl_ops_begin, but not wide enough.
Note that the same issue cannot be seen on the ioctl version
(__dev_ethtool) because the device reference is retrieved from within
the rtnl lock section there. Once dismantle started, the net device is
unlisted and no reference will be found.
Security readout for executives and security teams
Plain-English summary
A Linux kernel timing flaw can occur when network-device removal overlaps with an ethtool Netlink operation. The kernel may use synchronization state after device dismantling has begun. The supplied CVSS rates potential confidentiality, integrity, and availability impacts as high. This is a local, authenticated attack surface; the bundle provides no evidence of active exploitation.
Executive priority
Treat this as a high-priority kernel maintenance issue, not an unauthenticated internet emergency. Accelerate remediation on shared Linux systems and environments where local users can administer network devices or device removal occurs frequently. Confirm appliance exposure with vendors because upstream version data alone may not reflect backported fixes.
Technical view
CVE-2025-21701 is a CWE-362 race in ethnl operations. Device unregistration can destroy resources, including the RSS lock, before an operation such as set_channels uses them. The fix widens the ethnl_ops_begin check to reject operations on unregistering devices. The ioctl ethtool path is reportedly unaffected because it obtains the device reference while holding the RTNL lock.
Likely exposure
Exposure is limited to Linux kernels containing the vulnerable ethnl path. The bundle lists 5.16, 5.15.179, 6.1.129, 6.6.76, 6.12.13, 6.13.2, and 6.14 as affected. Its version records mix releases and commit identifiers, so determine exposure using distribution or product-vendor advisories rather than inferred upstream ranges.
Exploitation context
The CVSS vector is local, low complexity, low privilege, and requires no user interaction. Triggering depends on overlapping network-device unregistration with an ethnl operation. The record is not in KEV, and the supplied sources do not report exploitation in the wild, a public exploit, remote reachability, or demonstrated code execution.
Researcher notes
The reported trace involves ethnl_set_channels and a mutex validation warning after device teardown. The vulnerable ordering exists before the RTNL-protected portion of ethnl operations. The supplied material establishes the race and correction but does not establish reliable exploitation, precise outcomes beyond the CVSS assessment, or complete distribution-specific affected ranges.
Mitigation direction
Apply distribution or product-vendor kernel updates containing the referenced stable fix.
Ensure the corrected kernel becomes active during the approved maintenance window.
If patching is delayed, restrict local access and network-device administration according to vendor guidance.
Review the Debian and Siemens advisories where those products are deployed.
Validation and detection
Inventory active kernel releases across Linux hosts and appliances.
Map each release to its distribution or product-vendor CVE status.
Confirm package changelogs reference CVE-2025-21701 or a cited stable fix.
Verify the updated kernel is active after maintenance.
Review kernel logs for related mutex warnings, noting their absence does not prove safety.
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.
cwe · low confidence lookup
CWE-362: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
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.
2CVSS vectors
3Timeline events
3ADP providers
9Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: total
CVSS vector scores
2 official scores
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.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-362 · source CWE mapping
Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.