CVE-2025-21731

nbd: don't allow reconnect after disconnect

HIGH
7.8
CVSS Score
Published: February 27, 2025 at 02:07 AM UTC
Updated: October 15, 2026 at 02:17 AM UTC
4 products affected across 2 vendorsLinux KernelSIMATIC S7-1500 CPU 1518-4 Pn /dp MFP FirmwareSiplus S7-1500 CPU 1518-4 Pn /dp MFP Firmware

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.8
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

4.12 ≤ v < 5.4.2915.11 ≤ v < 5.15.1795.16 ≤ v < 6.1.1295.5 ≤ v < 5.10.2356.13 ≤ v < 6.13.26.2 ≤ v < 6.6.766.7 ≤ v < 6.12.134.12b7aa3d39385dc2d95899f9e379623fef446a2acd
Vendor states this is fixed in 6bef6222a3f6c7adb6396f77f25a3579d821b09a (fixed)
Vendor states this is fixed in 844b8cdc681612ff24df62cdefddeab5772fadf1 (fixed)
Vendor states this is fixed in 9793bd5ae4bdbdb2dde401a3cab94a6bfd05e302 (fixed)
Vendor states this is fixed in a8ee6ecde2b7bfb58c8a3afe8a9d2b848f580739 (fixed)
Vendor states this is fixed in d208d2c52b652913b5eefc8ca434b0d6b757f68f (fixed)
Vendor states this is fixed in e3be8862d73cac833e0fb7602636c19c6cb94b11 (fixed)
Vendor states this is fixed in e70a578487a47d7cf058904141e586684d1c3381 (fixed)
Vendor states this is fixed in e7343fa33751cb07c1c56b666bf37cfca357130e (fixed)
Vendor states this is fixed in 4.12 (unaffected)
Vendor states this is fixed in 5.10.235 (unaffected)
Vendor states this is fixed in 5.15.179 (unaffected)
Vendor states this is fixed in 5.4.291 (unaffected)
Vendor states this is fixed in 6.1.129 (unaffected)
Vendor states this is fixed in 6.12.13 (unaffected)
Vendor states this is fixed in 6.13.2 (unaffected)
Vendor states this is fixed in 6.14 (unaffected)
Vendor states this is fixed in 6.6.76 (unaffected)

References (13)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/6bef6222a3f6c7adb6396f77f25a3579d821b09a
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/844b8cdc681612ff24df62cdefddeab5772fadf1
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/9793bd5ae4bdbdb2dde401a3cab94a6bfd05e302
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/a8ee6ecde2b7bfb58c8a3afe8a9d2b848f580739
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/d208d2c52b652913b5eefc8ca434b0d6b757f68f
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/e3be8862d73cac833e0fb7602636c19c6cb94b11
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/e70a578487a47d7cf058904141e586684d1c3381
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/e7343fa33751cb07c1c56b666bf37cfca357130e

SSVC — Action Prioritization

SSVCNo known exploitNot automatableTotal impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

7.8HIGHCISA-ADP
Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-416

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card