# CVE-2026-90171: smb: smbdirect: release pending child sockets outside the handler lock

> 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.20% (percentile 5, 2026-11-26)
- **Published:** 2026-09-17T16:06:59.150Z
- **Modified:** 2026-10-19T09:19:06.980Z

## Who should check

- Anyone running Linux \>= dc691b91ad1677def14582a279e56fd943b52f94, \< 8ea83ef0c40ec4463695e22bc9ae43e29bcfede7; \>= dc691b91ad1677def14582a279e56fd943b52f94, \< db82fbe4bb68e68e4aef00ef5b79f92991d8ef8e
- Anyone running Linux 7.1

## Description

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

smb: smbdirect: release pending child sockets outside the handler lock

smbdirect\_socket\_destroy() releases the listener's pending/ready child
sockets while still holding the listener's handler lock, the
&id\_priv-\>handler\_mutex taken via rdma\_lock\_handler(), not
sc-\>listen.lock, and before the listener's own rdma\_destroy\_id().
That ordering has one real consequence and one cosmetic one.

The real one: smbdirect\_socket\_release() drops the child's last
reference, which destroys the child's cm\_id.  Doing that before the
listener's rdma\_destroy\_id() lets \_cma\_cancel\_listens(), running from
the listener's \_destroy\_id(), walk an already freed child id\_priv,
which KASAN catches as a slab-use-after-free during listener shutdown:

\[ 4758.909130\] BUG: KASAN: slab-use-after-free in \_\_mutex\_lock+0x1469/0x1560
\[ 4758.911450\] Read of size 1 at addr ffff88821c381db4 by task ksmbd.control/1652
\[ 4758.913262\] Call Trace:
\[ 4758.913267\]  \<TASK\>
\[ 4758.913299\]  \_\_mutex\_lock+0x1469/0x1560
\[ 4758.913408\]  \_cma\_cancel\_listens+0x312/0x3b0
\[ 4758.913413\]  \_destroy\_id+0x363/0xee0
\[ 4758.913417\]  smbdirect\_socket\_destroy\_sync+0x17d5/0x2440
\[ 4758.913443\]  smbdirect\_socket\_release+0x124/0x230
\[ 4758.913451\]  ksmbd\_rdma\_stop\_listening+0x9f/0x190
\[ 4758.913457\]  ksmbd\_conn\_transport\_destroy+0x65/0x3c0
\[ 4758.913463\]  kill\_server\_store+0x1fb/0x2b0
\[ 4758.913501\]  kernfs\_fop\_write\_iter+0x349/0x4d0
\[ 4758.913507\]  vfs\_write+0x5e7/0xc70
\[ 4758.913528\]  ksys\_write+0x12a/0x210
\[ 4758.913541\]  do\_syscall\_64+0x135/0x460
\[ 4758.913555\]  entry\_SYSCALL\_64\_after\_hwframe+0x77/0x7f

The cosmetic one: releasing a child recurses into
smbdirect\_socket\_destroy(), which takes the child's own
rdma\_lock\_handler() lock nested under the listener's.  The listener's
and the child's cm\_id are always different instances, so this cannot
deadlock for real; the CM core itself nests a new connection id's
handler\_mutex under the listening id's in cma\_ib\_req\_handler().  But
lockdep only sees one lock class, reports possible recursive locking,
and then disables itself, hiding real locking bugs for the rest of the
run:

\[ 2424.579653\] WARNING: possible recursive locking detected
\[ 2424.581180\] 7.1.0-next-20260623+ \#89 Not tainted
\[ 2424.582548\] --------------------------------------------
\[ 2424.584500\] ksmbd.control/8854 is trying to acquire lock:
\[ 2424.586817\] ffff888102303c20 (&id\_priv-\>handler\_mutex){+.+.}-{4:4}, at: smbdirect\_socket\_destroy\_sync+0xc39/0x2440
\[ 2424.590590\]
\[ 2424.590590\] but task is already holding lock:
\[ 2424.591601\] ffff888102046c20 (&id\_priv-\>handler\_mutex){+.+.}-{4:4}, at: smbdirect\_socket\_destroy\_sync+0xc39/0x2440
\[ 2424.594178\]
\[ 2424.594178\] other info that might help us debug this:
\[ 2424.596634\]  Possible unsafe locking scenario:
\[ 2424.596634\]
\[ 2424.598841\]        CPU0
\[ 2424.599765\]        ----
\[ 2424.600695\]   lock(&id\_priv-\>handler\_mutex);
\[ 2424.601836\]   lock(&id\_priv-\>handler\_mutex);
\[ 2424.602590\]
\[ 2424.602590\]  \*\*\* DEADLOCK \*\*\*
\[ 2424.602590\]
\[ 2424.604512\]  May be due to missing lock nesting notation

Splice the pending/ready children onto a local list under the
listener's listen.lock, while the handler lock is held so a concurrent
CM CONNECT\_REQUEST cannot add more, but defer the actual
smbdirect\_socket\_release() calls until after the listener's cm\_id has
been destroyed and its handler lock dropped.  The children are
independent sockets whose teardown needs neither the listener's
handler lock nor its cm\_id.

Found with ksmbdzzer \[2\], a KSMBD fuzzer that drives libFuzzer with a
kcov-dataflow \[1\] coverage vector: it folds each instrumented
comparison/argument's runtime operand value together with its PC (the
default arm mixes them as pc⊕val) so that a new operand value at a known
site counts as new coverage.

\[1\] https://lwn.net/Articles/1077606/
\[2\] https://github.com/yskzalloc/kcov-dataflow

## Affected and fixed versions

- Linux: \>= dc691b91ad1677def14582a279e56fd943b52f94, \< 8ea83ef0c40ec4463695e22bc9ae43e29bcfede7; \>= dc691b91ad1677def14582a279e56fd943b52f94, \< db82fbe4bb68e68e4aef00ef5b79f92991d8ef8e (cvelist)
- Linux: 7.1 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2026-90171.md
Affected: Linux >= dc691b91ad1677def14582a279e56fd943b52f94, < 8ea83ef0c40ec4463695e22bc9ae43e29bcfede7; >= dc691b91ad1677def14582a279e56fd943b52f94, < db82fbe4bb68e68e4aef00ef5b79f92991d8ef8e; Linux 7.1
Fixed in: Linux 8ea83ef0c40ec4463695e22bc9ae43e29bcfede7

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-2026-90171 being exploited?

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

### How serious is CVE-2026-90171?

It has no CVSS score yet. Unknown.

### Which versions are affected by CVE-2026-90171?

Linux \>= dc691b91ad1677def14582a279e56fd943b52f94, \< 8ea83ef0c40ec4463695e22bc9ae43e29bcfede7; \>= dc691b91ad1677def14582a279e56fd943b52f94, \< db82fbe4bb68e68e4aef00ef5b79f92991d8ef8e; Linux 7.1.

### Is there a fix for CVE-2026-90171?

Yes. Fixed in Linux 8ea83ef0c40ec4463695e22bc9ae43e29bcfede7. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2026-90171?

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/8ea83ef0c40ec4463695e22bc9ae43e29bcfede7>
- other: <https://git.kernel.org/stable/c/db82fbe4bb68e68e4aef00ef5b79f92991d8ef8e>

## 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-2026-90171>

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