# CVE-2026-64396: ksmbd: fix UAF of struct file\_lock in SMB2\_LOCK deferred-lock cancellation

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

- **Severity:** HIGH 8.8
- **CVSS:** 8.8 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, login needed
- **EPSS:** 0.63% (percentile 45, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2026-07-25T08:50:40.993Z
- **Modified:** 2026-09-04T14:47:23.990Z

## Who should check

- Anyone running Linux \>= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, \< 367c42a611fe488b7b03f1f6737f4dee0e8b20a2; \>= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, \< 7703fd9aba1f2483c8e55f9ff73b7663e0761ed9; \>= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, \< 463bbd79698513af4dad50fe1c573825f297ca2e; \>= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, \< 5aa1cb01155f96824003baf7997cdf1f150caba3; \>= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, \< 5c75275c0fc9a2deb0d8f5604edcb16f288171c8; \>= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, \< d20d1c8ba5765d1d12eefc0aee6385ab3f240e1e
- Anyone running Linux 5.15

## Description

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

ksmbd: fix UAF of struct file\_lock in SMB2\_LOCK deferred-lock cancellation

When a blocking byte-range lock request is deferred in the
FILE\_LOCK\_DEFERRED path, ksmbd registers the asynchronous work into
the connection's async\_requests list via setup\_async\_work(). The cancel
callback smb2\_remove\_blocked\_lock() holds a reference to the flock.

If the lock waiter is subsequently woken up but the work state is no
longer KSMBD\_WORK\_ACTIVE (e.g., due to a concurrent cancellation), the
cleanup path calls locks\_free\_lock(flock) without dequeuing the work from
the async\_requests list. Concurrently, smb2\_cancel() walks the list
under conn-\>request\_lock and invokes the cancel callback, which then
dereferences the already freed 'flock'. This leads to a slab-use-after-free
inside \_\_wake\_up\_common.

Fix this by restructuring the cleanup logic after the worker returns
from ksmbd\_vfs\_posix\_lock\_wait(). Move list\_del(&smb\_lock-\>llist) and
release\_async\_work(work) to the top of the cleanup block. This guarantees
that the async work is completely dequeued and serialized under
conn-\>request\_lock before locks\_free\_lock(flock) is called, rendering
the flock unreachable for any concurrent smb2\_cancel().

## Affected and fixed versions

- Linux: \>= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, \< 367c42a611fe488b7b03f1f6737f4dee0e8b20a2; \>= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, \< 7703fd9aba1f2483c8e55f9ff73b7663e0761ed9; \>= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, \< 463bbd79698513af4dad50fe1c573825f297ca2e; \>= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, \< 5aa1cb01155f96824003baf7997cdf1f150caba3; \>= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, \< 5c75275c0fc9a2deb0d8f5604edcb16f288171c8; \>= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, \< d20d1c8ba5765d1d12eefc0aee6385ab3f240e1e (cvelist)
- Linux: 5.15 (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-64396. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-64396.md
Affected: Linux >= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, < 367c42a611fe488b7b03f1f6737f4dee0e8b20a2; >= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, < 7703fd9aba1f2483c8e55f9ff73b7663e0761ed9; >= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, < 463bbd79698513af4dad50fe1c573825f297ca2e; >= e2f34481b24db2fd634b5ed…
Fixed in: Linux 367c42a611fe488b7b03f1f6737f4dee0e8b20a2, Linux 7703fd9aba1f2483c8e55f9ff73b7663e0761ed9, Linux 463bbd79698513af4dad50fe1c573825f297ca2e, Linux 5aa1cb01155f96824003baf7997cdf1f150caba3, Linux 5c75275c0fc9a2deb0d8f5604edcb16f288171c8

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-64396 being exploited?

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

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

High: CVSS 8.8 (v3.1, scored by CNA). Remote, login needed.

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

Linux \>= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, \< 367c42a611fe488b7b03f1f6737f4dee0e8b20a2; \>= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, \< 7703fd9aba1f2483c8e55f9ff73b7663e0761ed9; \>= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, \< 463bbd79698513af4dad50fe1c573825f297ca2e; \>= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, \< 5aa1cb01155f96824003baf7997cdf1f150caba3; \>= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, \< 5c75275c0fc9a2deb0d8f5604edcb16f288171c8; \>= e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, \< d20d1c8ba5765d1d12eefc0aee6385ab3f240e1e; Linux 5.15.

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

Yes. Fixed in Linux 367c42a611fe488b7b03f1f6737f4dee0e8b20a2, Linux 7703fd9aba1f2483c8e55f9ff73b7663e0761ed9, Linux 463bbd79698513af4dad50fe1c573825f297ca2e, Linux 5aa1cb01155f96824003baf7997cdf1f150caba3, Linux 5c75275c0fc9a2deb0d8f5604edcb16f288171c8. No fix listed yet: follow the vendor advisory.

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

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

- patch: <https://git.kernel.org/stable/c/367c42a611fe488b7b03f1f6737f4dee0e8b20a2>
- patch: <https://git.kernel.org/stable/c/7703fd9aba1f2483c8e55f9ff73b7663e0761ed9>
- patch: <https://git.kernel.org/stable/c/463bbd79698513af4dad50fe1c573825f297ca2e>
- patch: <https://git.kernel.org/stable/c/5aa1cb01155f96824003baf7997cdf1f150caba3>
- patch: <https://git.kernel.org/stable/c/5c75275c0fc9a2deb0d8f5604edcb16f288171c8>
- patch: <https://git.kernel.org/stable/c/d20d1c8ba5765d1d12eefc0aee6385ab3f240e1e>

## 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-64396>

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