High severity · published Feb 27, 2025
CVE-2025-21731
nbd: don't allow reconnect after disconnect
7.8
CVSS
0.2%
EPSS
No
On KEV
Description
In the Linux kernel, the following vulnerability has been resolved:
nbd: don't allow reconnect after disconnect
Following process can cause nbd_config UAF:
1) grab nbd_config temporarily;
2) nbd_genl_disconnect() flush all recv_work() and release the
initial reference:
nbd_genl_disconnect
nbd_disconnect_and_put
nbd_disconnect
flush_workqueue(nbd->recv_workq)
if (test_and_clear_bit(NBD_RT_HAS_CONFIG_REF, ...))
nbd_config_put
-> due to step 1), reference is still not zero
3) nbd_genl_reconfigure() queue recv_work() again;
nbd_genl_reconfigure
config = nbd_get_config_unlocked(nbd)
if (!config)
-> succeed
if (!test_bit(NBD_RT_BOUND, ...))
-> succeed
nbd_reconnect_socket
queue_work(nbd->recv_workq, &args->work)
4) step 1) release the reference;
5) Finially, recv_work() will trigger UAF:
recv_work
nbd_config_put(nbd)
-> nbd_config is freed
atomic_dec(&config->recv_threads)
-> UAF
Fix the problem by clearing NBD_RT_BOUND in nbd_genl_disconnect(), so
that nbd_genl_reconfigure() will fail.
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Attack vector
Local
Complexity
Low
Privileges
Low
User interaction
None
Confidentiality
High
Integrity
High
Availability
High
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.2% · higher than 15% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
KE
Kernel · Linux
4.12 before 5.4.291; 5.5 before 5.10.235; 5.11 before 5.15.179; 5.16 before 6.1.129; 6.2 before 6.6.76; 6.7 before 6.12.13; +1 more · source: NVD
LI
Linux · Linux
b7aa3d39385dc2d95899f9e379623fef446a2acd before e70a578487a47d7cf058904141e586684d1c3381; b7aa3d39385dc2d95899f9e379623fef446a2acd before 6bef6222a3f6c7adb6396f77f25a3579d821b09a; b7aa3d39385dc2d95899f9e379623fef446a2acd before e3be8862d73cac833e0fb7602636c19c6cb94b11; b7aa3d39385dc2d95899f9e379623fef446a2acd before e7343fa33751cb07c1c56b666bf37cfca357130e; b7aa3d39385dc2d95899f9e379623fef446a2acd before d208d2c52b652913b5eefc8ca434b0d6b757f68f; b7aa3d39385dc2d95899f9e379623fef446a2acd before a8ee6ecde2b7bfb58c8a3afe8a9d2b848f580739; +3 more · source: vendor
SS
SIMATIC S7-1500 CPU 1518-4 PN/DP MFP · Siemens
V3.1.6; V3.1.7; V3.1.6; V3.1.7 · source: CISA
SS
SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP · Siemens
V3.1.6; V3.1.7; V3.1.6; V3.1.7 · source: CISA
SS
SIMATIC S7-1500 TM MFP - GNU/Linux subsystem · Siemens
0 · source: CISA
SS
SIPLUS S7-1500 CPU 1518-4 PN/DP MFP · Siemens
V3.1.6; V3.1.7 · source: CISA
In the news
VulnerabilityHigh
Siemens SIMATIC S7-1500 CPU 1518(F)-4 PN/DP MFP
View CSAF
Summary
Multiple vulnerabilities have been identified in the additional GNU/Linux subsystem of the firmware version V3.1.6 for the SIMATIC S7-1500 CPU 1518(F)-4 PN/DP MFP (incl. SIPLUS variant). Siemens is preparing fix versions and recommends specific countermeasures for products where fixes are not, or not yet available.
The following versions of Siemens SIMATIC S7-1500 CPU 1518(F)-4 PN/DP MFP are affected:
SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AB0) vers:intdot/>=3.1.6 (CVE-2021-41617, CVE-2023-28531, CVE-2023-51384, CVE-2023-52927, CVE-2024-26783, CVE-2024-27056, CVE-2024-28956, CVE-2024-36903, CVE-2024-36927, CVE-2024-42079, CVE-2024-46786, CVE-2024-47736, CVE-2024-47809, CVE-2024-49968, CVE-2024-49994, CVE-2024-49998, CVE-2024-50014, CVE-2024-50063, CVE-2024-50164, CVE-2024-50298, CVE-2024-53124, CVE-2024-53170, CVE-2024-54458, CVE-2024-56631, CVE-2024-56703, CVE-2024-56719, CVE-2024-57917, CVE-2024-57924, CVE-2024-57973, CVE-2024-57977, CVE-2024-57979, CVE-2024-58011, CVE-2024-58016, CVE-2024-58020, CVE-2024-58056, CVE-2024-58058, CVE-2024-58061, CVE-2024-58086, CVE-2025-21645, CVE-2025-21648, CVE-2025-21655, CVE-2025-21676, CVE-2025-21682, CVE-2025-21702, CVE-2025-21705, CVE-2025-21706, CVE-2025-21707, CVE-2025-21718, CVE-2025-21731, CVE-2025-21745, CVE-2025-21758, CVE-2025-21760, CVE-2025-21764, CVE-2025-21765, CVE-2025-21780, CVE-2025-21795, CVE-2025-21796, CVE-2025-21802, CVE-2025-21814, CVE-2025-21846, CVE-2025-21853, CVE-2...
Jul 28, 2026·CISA Advisories
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2025-21731
CVE.org
https://www.cve.org/CVERecord?id=CVE-2025-21731
Patch
https://git.kernel.org/stable/c/6bef6222a3f6c7adb6396f77f25a3579d821b09a
Patch
https://git.kernel.org/stable/c/844b8cdc681612ff24df62cdefddeab5772fadf1
Patch
https://git.kernel.org/stable/c/9793bd5ae4bdbdb2dde401a3cab94a6bfd05e302
Patch
https://git.kernel.org/stable/c/a8ee6ecde2b7bfb58c8a3afe8a9d2b848f580739
Patch
https://git.kernel.org/stable/c/d208d2c52b652913b5eefc8ca434b0d6b757f68f
Patch
https://git.kernel.org/stable/c/e3be8862d73cac833e0fb7602636c19c6cb94b11
More from Kernel
9.8
CVE-2025-39682
tls: fix handling of zero-length records on the rx_list
8.8
CVE-2026-53266
netfilter: bridge: make ebt_snat ARP rewrite writable
8.8
CVE-2013-6282
Linux Kernel Improper Input Validation Vulnerability
8.4
CVE-2022-0185
Linux Kernel Heap-Based Buffer Overflow Vulnerability
8.4
CVE-2013-2094
Linux Kernel Privilege Escalation Vulnerability
