CVE-2025-68372: nbd: defer config put in recv_work

Published Dec 24, 2025
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

nbd: defer config put in recvwork

There is one uaf issue in recvwork when running NBDCLEARSOCK and NBDCMDRECONFIGURE: nbdgenlconnect // confref=2 (connect and recvwork A) nbdopen // confref=3 recvwork A done // confref=2 NBDCLEARSOCK // confref=1 nbdgenlreconfigure // confref=2 (trigger recvwork B) close nbd // confref=1 recvwork B configput // confref=0 atomicdec(&config->recvthreads); -> UAF

Or only running NBDCLEARSOCK: nbdgenlconnect // confref=2 nbdopen // confref=3 NBDCLEARSOCK // confref=2 close nbd nbdrelease configput // confref=1 recvwork configput // confref=0 atomicdec(&config->recvthreads); -> UAF

Commit 87aac3a80af5 ("nbd: call nbdconfigput() before notifying the waiter") moved nbdconfigput() to run before waking up the waiter in recvwork, in order to ensure that nbdstartdeviceioctl() would not be woken up while nbd->taskrecv was still uncleared.

However, in nbdstartdeviceioctl(), after being woken up it explicitly calls flushworkqueue() to make sure all current works are finished. Therefore, there is no need to move the config put ahead of the wakeup.

Move nbdconfigput() to the end of recvwork, so that the reference is held for the whole lifetime of the worker thread. This makes sure the config cannot be freed while recvwork is still running, even if clear + reconfigure interleave.

In addition, we don't need to worry about recvwork dropping the last nbdput (which causes deadlock):

path A (netlink with NBDCFLAGDESTROYONDISCONNECT): connect // nbdrefs=1 (trigger recvwork) open nbd // nbdrefs=2 NBDCLEARSOCK close nbd nbdrelease nbddisconnectandput flushworkqueue // recvwork done nbdconfigput nbdput // nbdrefs=1 nbdput // nbdrefs=0 queuework

path B (netlink without NBDCFLAGDESTROYONDISCONNECT): connect // nbdrefs=2 (trigger recvwork) open nbd // nbdrefs=3 NBDCLEARSOCK // confrefs=2 close nbd nbdrelease nbdconfigput // confrefs=1 nbdput // nbdrefs=2 recvwork done // confrefs=0, nbdrefs=1 rmmod // nbdrefs=0

Depends-on: e2daec488c57 ("nbd: Fix hungtask when nbdconfigput")

Affected Software

3 affected componentsFixes available
Linux Linux kernel
Microsoft azl3 kernel 6.6.117.1-1
Microsoft azl3 kernel 6.6.119.3-3

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Linux kernel (nbd) to a version that resolves this vulnerability.

    Patch 87aac3a80af5
  2. Upgrade

    Upgrade Linux kernel (nbd) to a version that resolves this vulnerability.

    Patch e2daec488c57

Event History

Dec 24, 2025
CVE Published
via MITRE·10:33 AM
Data Sourced
via MITRE·10:33 AM
Description
Data Sourced
via NVD·11:16 AM
Description
Dec 25, 2025
Data Sourced
via Microsoft·01:04 AM
DescriptionSeverityWeaknessAffected Software
Updated
via Microsoft·09:04 AM
DescriptionSeverity
Updated
via Microsoft·09:04 AM
Affected Software

Frequently Asked Questions

1

What is the severity of CVE-2025-68372?

CVE-2025-68372 has been classified as having a high severity due to its potential impact on system stability.

2

How do I fix CVE-2025-68372?

To fix CVE-2025-68372, update your Linux kernel to the latest stable version where the vulnerability is patched.

3

What systems are affected by CVE-2025-68372?

CVE-2025-68372 affects the Linux kernel, specifically those utilizing the NBD (Network Block Device) protocol.

4

What are the potential consequences of CVE-2025-68372?

Exploitation of CVE-2025-68372 may lead to use-after-free conditions, potentially allowing for privilege escalation or system crashes.

5

How can I determine if my system is vulnerable to CVE-2025-68372?

To determine if your system is vulnerable to CVE-2025-68372, check the version of your Linux kernel against reported vulnerabilities.

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