CVE-2025-21701: net: avoid race between device unregistration and ethnl ops

Published Feb 13, 2025
·
Updated

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.

DEBUGLOCKSWARNON(lock->magic != lock) WARNING: CPU: 3 PID: 3754 at kernel/locking/mutex.c:564 mutexlock+0xc8a/0x1120 CPU: 3 UID: 0 PID: 3754 Comm: ethtool Not tainted 6.13.0-rc6+ #771 RIP: 0010:mutexlock+0xc8a/0x1120 Call Trace: <TASK> ethtoolcheckmaxchannel+0x1ea/0x880 ethnlsetchannels+0x3c3/0xb10 ethnldefaultsetdoit+0x306/0x650 genlfamilyrcvmsgdoit+0x1e3/0x2c0 genlrcvmsg+0x432/0x6f0 netlinkrcvskb+0x13d/0x3b0 genlrcv+0x28/0x40 netlinkunicast+0x42e/0x720 netlinksendmsg+0x765/0xc20 syssendto+0x3ac/0x420 x64syssendto+0xe0/0x1c0 dosyscall64+0x95/0x180 entrySYSCALL64afterhwframe+0x76/0x7e

This is because unregisternetdevicemanynotify might run before the rtnl lock section of ethnl operations, eg. setchannels 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 ethnlopsbegin, but not wide enough.

Note that the same issue cannot be seen on the ioctl version (devethtool) 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.

Other sources

This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.

Launchpad

Affected Software

14 affected componentsFixes available
Linux Linux kernel
debian/linux<=5.10.223-1, <=5.10.234-1
6.1.129-16.1.135-16.12.27-1
debian/linux-6.1
6.1.129-1~deb11u1
Linux Linux kernel>=5.10.87<5.11
Linux Linux kernel>=5.15.8<5.15.179
Linux Linux kernel>=5.16.1<6.1.129
Linux Linux kernel>=6.2<6.6.76
Linux Linux kernel>=6.7<6.12.13
Linux Linux kernel>=6.13<6.13.2
Linux Linux kernel=5.16
Linux Linux kernel=5.16-rc5
Linux Linux kernel=5.16-rc6
Linux Linux kernel=5.16-rc7
Linux Linux kernel=5.16-rc8

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.27-1
  2. Upgrade

    Upgrade debian/linux-6.1 to a version that resolves this vulnerability.

    Fixed in 6.1.129-1~deb11u1
  3. Compensating control

    In the Linux networking ethtool/ethnl netlink path, deny/abort ethnl operations (e.g., channel modification) on net devices once device unregistration/dismantle has started, to avoid the race between device unregistration (unregister_netdevice_many_notify) and ethnl ops while the number of channels is being modified.

Event History

Feb 13, 2025
CVE Published
via MITRE·03:05 PM
Data Sourced
via MITRE·03:05 PM
DescriptionSeverity
Data Sourced
via NVD·03:15 PM
Description
Data Sourced
via NVD·03:15 PM
RemedySeverityWeaknessAffected Software
Apr 23, 2025
Data Sourced
via Launchpad·02:33 PM
Description
May 5, 2025
Data Sourced
via Ubuntu·02:34 PM
RemedyDescriptionSeverityAffected Software
Oct 29, 58546
Event
via MITRE·01:46 PM
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-21701?

CVE-2025-21701 is classified as a moderate severity vulnerability affecting the Linux kernel.

2

How do I fix CVE-2025-21701?

Fix CVE-2025-21701 by updating the Linux kernel to the latest stable version where the vulnerability has been addressed.

3

What systems are affected by CVE-2025-21701?

CVE-2025-21701 affects systems running susceptible versions of the Linux kernel, particularly when handling device unregistration.

4

What potential impact does CVE-2025-21701 have?

CVE-2025-21701 could lead to race conditions, which may affect device registration and stability of the system.

5

Is CVE-2025-21701 being actively exploited?

As of now, there is no public knowledge that CVE-2025-21701 is being actively exploited in the wild.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203