CVE-2025-21986
net: switchdev: Convert blocking notification chain to a raw one
Check your servers for CVE-2025-21986
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2025-21986 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
In the Linux kernel, the following vulnerability has been resolved:
net: switchdev: Convert blocking notification chain to a raw one
A blocking notification chain uses a read-write semaphore to protect the integrity of the chain. The semaphore is acquired for writing when adding / removing notifiers to / from the chain and acquired for reading when traversing the chain and informing notifiers about an event.
In case of the blocking switchdev notification chain, recursive notifications are possible which leads to the semaphore being acquired twice for reading and to lockdep warnings being generated [1].
Specifically, this can happen when the bridge driver processes a SWITCHDEV_BRPORT_UNOFFLOADED event which causes it to emit notifications about deferred events when calling switchdev_deferred_process().
Fix this by converting the notification chain to a raw notification chain in a similar fashion to the netdev notification chain. Protect the chain using the RTNL mutex by acquiring it when modifying the chain. Events are always informed under the RTNL mutex, but add an assertion in call_switchdev_blocking_notifiers() to make sure this is not violated in the future.
Maintain the "blocking" prefix as events are always emitted from process context and listeners are allowed to block.
[1]: WARNING: possible recursive locking detected 6.14.0-rc4-custom-g079270089484 #1 Not tainted -------------------------------------------- ip/52731 is trying to acquire lock: ffffffff850918d8 ((switchdev_blocking_notif_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x58/0xa0
but task is already holding lock: ffffffff850918d8 ((switchdev_blocking_notif_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x58/0xa0
other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock((switchdev_blocking_notif_chain).rwsem); lock((switchdev_blocking_notif_chain).rwsem);
*** DEADLOCK *** May be due to missing lock nesting notation 3 locks held by ip/52731: #0: ffffffff84f795b0 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_newlink+0x727/0x1dc0 #1: ffffffff8731f628 (&net->rtnl_mutex){+.+.}-{4:4}, at: rtnl_newlink+0x790/0x1dc0 #2: ffffffff850918d8 ((switchdev_blocking_notif_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x58/0xa0
stack backtrace: ... ? __pfx_down_read+0x10/0x10 ? __pfx_mark_lock+0x10/0x10 ? __pfx_switchdev_port_attr_set_deferred+0x10/0x10 blocking_notifier_call_chain+0x58/0xa0 switchdev_port_attr_notify.constprop.0+0xb3/0x1b0 ? __pfx_switchdev_port_attr_notify.constprop.0+0x10/0x10 ? mark_held_locks+0x94/0xe0 ? switchdev_deferred_process+0x11a/0x340 switchdev_port_attr_set_deferred+0x27/0xd0 switchdev_deferred_process+0x164/0x340 br_switchdev_port_unoffload+0xc8/0x100 [bridge] br_switchdev_blocking_event+0x29f/0x580 [bridge] notifier_call_chain+0xa2/0x440 blocking_notifier_call_chain+0x6e/0xa0 switchdev_bridge_port_unoffload+0xde/0x1a0 ...
Exploitation
EPSS 0.17%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 6.71% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 5 Nov 2026):
- Exploitation
- none: CISA did not find evidence of exploitation or a public proof of concept
- Automatable
- no: each attack takes manual steps
- Technical impact
- partial: limited control or limited data
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 91ac2c79e896b28a4a3a262384689ee6dfeaf083, before af757f5ee3f754c5dceefb05c12ff37cb46fc682 affected from a83856bd0c240267a86ce3388f3437d6ba5ac5ca, before 1f7d051814e7a0cb1f0717ed5527c1059992129d affected from f7a70d650b0b6b0134ccba763d672c8439d9f09b, before a597d4b75669ec82c72cbee9fe75a15d04b35b2b affected from f7a70d650b0b6b0134ccba763d672c8439d9f09b, before f9ed3fb50b872bd78bcb01f25087f9e4e25085d8 affected from f7a70d650b0b6b0134ccba763d672c8439d9f09b, before 62531a1effa87bdab12d5104015af72e60d926ff affected a7589eca09929c3cc2a62950ef7f40bcc58afe3a affected from 6.1.80, before 6.1.132 affected from 6.6.19, before 6.6.84 affected from 6.7.7, before 6.8
Other versions: unaffected
|
| Linux |
affected 6.8 unaffected before 6.8 unaffected from 6.1.132 up to and including 6.1.* unaffected from 6.6.84 up to and including 6.6.* unaffected from 6.12.20 up to and including 6.12.* unaffected from 6.13.8 up to and including 6.13.* unaffected 6.14 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2025-21986 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2025-21986
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2025-21986
trivy image --scanners vuln IMAGE | grep CVE-2025-21986
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/af757f5ee3f754c5dceefb05c12ff37cb46fc682 git.kernel.org
- https://git.kernel.org/stable/c/1f7d051814e7a0cb1f0717ed5527c1059992129d git.kernel.org
- https://git.kernel.org/stable/c/a597d4b75669ec82c72cbee9fe75a15d04b35b2b git.kernel.org
- https://git.kernel.org/stable/c/f9ed3fb50b872bd78bcb01f25087f9e4e25085d8 git.kernel.org
- https://git.kernel.org/stable/c/62531a1effa87bdab12d5104015af72e60d926ff git.kernel.org
- https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html lists.debian.org
Source: the record CVE-2025-21986 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse