# CVE-2025-68366: nbd: defer config unlock in nbd\_genl\_connect

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **EPSS:** 0.29% (percentile 14, 2026-11-26)
- **Published:** 2025-12-24T10:32:53.399Z
- **Modified:** 2026-10-13T11:10:00.203Z

## Who should check

- Anyone running Linux \>= e46c7287b1c27683a8e30ca825fb98e2b97f1099, \< 330d688a5ca53857828081a3cf31b92ad1b0b3ed; \>= e46c7287b1c27683a8e30ca825fb98e2b97f1099, \< cd93db1b1b4460e6ee77564024ea461e5940f69c; \>= e46c7287b1c27683a8e30ca825fb98e2b97f1099, \< ae3e7bc1f4b393ae20e5c85583eb2c6977374716; \>= e46c7287b1c27683a8e30ca825fb98e2b97f1099, \< 2e5e0665a594f076ef2b9439447bae8be293d09d; \>= e46c7287b1c27683a8e30ca825fb98e2b97f1099, \< c9b99c948b4fb014812afe7b5ccf2db121d22e46; \>= e46c7287b1c27683a8e30ca825fb98e2b97f1099, \< 9a38306643874566d20f7aba7dff9e6f657b51a9; \>= e46c7287b1c27683a8e30ca825fb98e2b97f1099, \< c9e805f6a35d1dd189a9345595a5c20e87611942; \>= e46c7287b1c27683a8e30ca825fb98e2b97f1099, \< 1649714b930f9ea6233ce0810ba885999da3b5d4
- Anyone running Linux 4.12

## Description

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

nbd: defer config unlock in nbd\_genl\_connect

There is one use-after-free warning when running NBD\_CMD\_CONNECT and
NBD\_CLEAR\_SOCK:

nbd\_genl\_connect
  nbd\_alloc\_and\_init\_config // config\_refs=1
  nbd\_start\_device // config\_refs=2
  set NBD\_RT\_HAS\_CONFIG\_REF			open nbd // config\_refs=3
  recv\_work done // config\_refs=2
						NBD\_CLEAR\_SOCK // config\_refs=1
						close nbd // config\_refs=0
  refcount\_inc -\> uaf

------------\[ cut here \]------------
refcount\_t: addition on 0; use-after-free.
WARNING: CPU: 24 PID: 1014 at lib/refcount.c:25 refcount\_warn\_saturate+0x12e/0x290
 nbd\_genl\_connect+0x16d0/0x1ab0
 genl\_family\_rcv\_msg\_doit+0x1f3/0x310
 genl\_rcv\_msg+0x44a/0x790

The issue can be easily reproduced by adding a small delay before
refcount\_inc(&nbd-\>config\_refs) in nbd\_genl\_connect():

        mutex\_unlock(&nbd-\>config\_lock);
        if (!ret) {
                set\_bit(NBD\_RT\_HAS\_CONFIG\_REF, &config-\>runtime\_flags);
+               printk("before sleep\\n");
+               mdelay(5 \* 1000);
+               printk("after sleep\\n");
                refcount\_inc(&nbd-\>config\_refs);
                nbd\_connect\_reply(info, nbd-\>index);
        }

## Affected and fixed versions

- Linux: \>= e46c7287b1c27683a8e30ca825fb98e2b97f1099, \< 330d688a5ca53857828081a3cf31b92ad1b0b3ed; \>= e46c7287b1c27683a8e30ca825fb98e2b97f1099, \< cd93db1b1b4460e6ee77564024ea461e5940f69c; \>= e46c7287b1c27683a8e30ca825fb98e2b97f1099, \< ae3e7bc1f4b393ae20e5c85583eb2c6977374716; \>= e46c7287b1c27683a8e30ca825fb98e2b97f1099, \< 2e5e0665a594f076ef2b9439447bae8be293d09d; \>= e46c7287b1c27683a8e30ca825fb98e2b97f1099, \< c9b99c948b4fb014812afe7b5ccf2db121d22e46; \>= e46c7287b1c27683a8e30ca825fb98e2b97f1099, \< 9a38306643874566d20f7aba7dff9e6f657b51a9; \>= e46c7287b1c27683a8e30ca825fb98e2b97f1099, \< c9e805f6a35d1dd189a9345595a5c20e87611942; \>= e46c7287b1c27683a8e30ca825fb98e2b97f1099, \< 1649714b930f9ea6233ce0810ba885999da3b5d4 (cvelist)
- Linux: 4.12 (cvelist)

## Mitigation

- Upgrade Linux to 1649714b930f9ea6233ce0810ba885999da3b5d4 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-68366. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-68366.md
Affected: Linux >= e46c7287b1c27683a8e30ca825fb98e2b97f1099, < 330d688a5ca53857828081a3cf31b92ad1b0b3ed; >= e46c7287b1c27683a8e30ca825fb98e2b97f1099, < cd93db1b1b4460e6ee77564024ea461e5940f69c; >= e46c7287b1c27683a8e30ca825fb98e2b97f1099, < ae3e7bc1f4b393ae20e5c85583eb2c6977374716; >= e46c7287b1c27683a8e30ca…
Fixed in: Linux 330d688a5ca53857828081a3cf31b92ad1b0b3ed, Linux 2e5e0665a594f076ef2b9439447bae8be293d09d, Linux 9a38306643874566d20f7aba7dff9e6f657b51a9, Linux 1649714b930f9ea6233ce0810ba885999da3b5d4

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-68366 being exploited?

There is no confirmed exploitation: CVE-2025-68366 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.29% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-68366?

It has no CVSS score yet. Unknown.

### Which versions are affected by CVE-2025-68366?

Linux \>= e46c7287b1c27683a8e30ca825fb98e2b97f1099, \< 330d688a5ca53857828081a3cf31b92ad1b0b3ed; \>= e46c7287b1c27683a8e30ca825fb98e2b97f1099, \< cd93db1b1b4460e6ee77564024ea461e5940f69c; \>= e46c7287b1c27683a8e30ca825fb98e2b97f1099, \< ae3e7bc1f4b393ae20e5c85583eb2c6977374716; \>= e46c7287b1c27683a8e30ca825fb98e2b97f1099, \< 2e5e0665a594f076ef2b9439447bae8be293d09d; \>= e46c7287b1c27683a8e30ca825fb98e2b97f1099, \< c9b99c948b4fb014812afe7b5ccf2db121d22e46; \>= e46c7287b1c27683a8e30ca825fb98e2b97f1099, \< 9a38306643874566d20f7aba7dff9e6f657b51a9; \>= e46c7287b1c27683a8e30ca825fb98e2b97f1099, \< c9e805f6a35d1dd189a9345595a5c20e87611942; \>= e46c7287b1c27683a8e30ca825fb98e2b97f1099, \< 1649714b930f9ea6233ce0810ba885999da3b5d4; Linux 4.12.

### Is there a fix for CVE-2025-68366?

Yes. Fixed in Linux 330d688a5ca53857828081a3cf31b92ad1b0b3ed, Linux 2e5e0665a594f076ef2b9439447bae8be293d09d, Linux 9a38306643874566d20f7aba7dff9e6f657b51a9, Linux 1649714b930f9ea6233ce0810ba885999da3b5d4. Upgrade Linux to 1649714b930f9ea6233ce0810ba885999da3b5d4 or later.

### How do I check if I'm affected by CVE-2025-68366?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/330d688a5ca53857828081a3cf31b92ad1b0b3ed>
- other: <https://git.kernel.org/stable/c/cd93db1b1b4460e6ee77564024ea461e5940f69c>
- other: <https://git.kernel.org/stable/c/ae3e7bc1f4b393ae20e5c85583eb2c6977374716>
- other: <https://git.kernel.org/stable/c/2e5e0665a594f076ef2b9439447bae8be293d09d>
- other: <https://git.kernel.org/stable/c/c9b99c948b4fb014812afe7b5ccf2db121d22e46>
- other: <https://git.kernel.org/stable/c/9a38306643874566d20f7aba7dff9e6f657b51a9>
- other: <https://git.kernel.org/stable/c/c9e805f6a35d1dd189a9345595a5c20e87611942>
- other: <https://git.kernel.org/stable/c/1649714b930f9ea6233ce0810ba885999da3b5d4>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-68366>

HTML: <https://flawdb.com/CVE-2025-68366> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-68366>
