ksmbd: fix use-after-free of a deferred file_lock on SMB2_CLOSE then SMB2_CANCEL
Noroxi assessment
Priority: Monitor (action score 35/100)
- The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
- Probability of exploitation in the next 30 days: 0.43% (FIRST EPSS).
- Anyone who can reach it over the internet can trigger it. A low-privileged account is enough. No user action is required. No special conditions are required; it is repeatable.
- Fixed version: Linux Linux 10f293a07f9e10e988b0ae44e2e99c631f5a68e0, 12c36c99655f325befe50c26842f7deca414c381, 6.1.178.
Low priority for now. Upgrade to Linux Linux 10f293a07f9e10e988b0ae44e2e99c631f5a68e0, 12c36c99655f325befe50c26842f7deca414c381, 6.1.178 or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: NVD · CVE.org · FIRST EPSS
In the Linux kernel, the following vulnerability has been resolved: ksmbd: fix use-after-free of a deferred file_lock on SMB2_CLOSE then SMB2_CANCEL Commit f580d27e8928 ("ksmbd: fix use-after-free of a deferred file_lock on double SMB2_CANCEL") made smb2_cancel() skip a work whose state is KSMBD_WORK_CANCELLED, so its cancel_fn cannot be fired a second time. But KSMBD_WORK has three states (ACTIVE, CANCELLED, CLOSED), and the same freeing producer path is reached for CLOSED too: SMB2_CLOSE on the locking handle -> set_close_state_blocked_works() sets the deferred work's state to KSMBD_WORK_CLOSED and wakes the smb2_lock() worker. The worker takes the non-ACTIVE early-exit, locks_free_lock()s the file_lock and, because the state is not KSMBD_WORK_CANCELLED, takes the STATUS_RANGE_NOT_LOCKED branch with "goto out2" -- which, like the cancelled branch, skips release_async_work(). The work stays on conn->async_requests with a live cancel_fn = smb2_remove_blocked_lock pointing at the freed file_lock. A subsequent SMB2_CANCEL for the same AsyncId then passes the KSMBD_WORK_CANCELLED-only guard (its state is KSMBD_WORK_CLOSED), so smb2_cancel() fires cancel_fn again over the freed file_lock -- the same use-after-free fixed, via SMB2_CLOSE instead of a first SMB2_CANCEL: BUG: KASAN: slab-use-after-free in __locks_delete_block __locks_delete_block locks_delete_block ksmbd_vfs_posix_lock_unblock smb2_remove_blocked_lock smb2_cancel <- 2nd SMB2_CANCEL fires cancel_fn handle_ksmbd_work Allocated by ...: locks_alloc_lock <- smb2_lock Freed by ...: locks_free_lock <- smb2_lock (non-ACTIVE early-exit) ... cache file_lock_cache of size 192 Reproduced on mainline 7.1-rc7 (which already contains f580d27e8928) with KASAN by an authenticated SMB client; the double-SMB2_CANCEL control is silent on that kernel, so the splat is attributable to the CLOSE trigger. Only an ACTIVE deferred work may have its cancel_fn fired: both terminal states (CANCELLED and CLOSED) reach the smb2_lock() early-exit that frees the file_lock and skips release_async_work(). Guard on KSMBD_WORK_ACTIVE so any non-active work is skipped.
- Published
- Jul 25, 2026
- Updated
- Sep 3, 2026
- EPSS
- 0.4% · 36th percentile
- CWE
- CWE-416
Report tools
Action score
35
Monitor
Low priority for now.
- CVSS
- 35 / 40 · 8.8 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · 0.4%
CNA vs NVD score
- NVD
- —
- CNA · Linux
- 8.8
- NVD has not scored this yet; the score shown is the CNA’s.
The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- No public exploit code on record
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Running WordPress? Scan your site free with WP Lens
Noroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| linux | linux kernel | cpe:2.3:o:linux:linux_kernel |
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- linux linux kernel6.1.176 and later · before 6.1.178
- linux linux kernel6.6.143 and later · before 6.6.145
- linux linux kernel6.12.94 and later · before 6.12.96
- linux linux kernel6.18.36 and later · before 6.18.39
- linux linux kernel7.0.13 and later · before 7.1
- linux linux kernel7.1.1 and later · before 7.1.4
- linux linux kernel7.1
Versions reported by the vendor
Affected version ranges reported by the assigning authority (Linux). Independent of NVD's CPE analysis and usually ahead of it.
Linux Linux
- 2b2eda2821cff1d1b5a423b6ee7d8fc6fbc8e694, 7.1affected
- b7063c7426ea5a4d15e01b60538718765392f49d and later · before a796ba4e61d5e14e07b79a359faac69f8f9b22a3affected · git
- 0da2e073f9cbf4985a0fd9acb71bc5ff599f8afd and later · before b8e274e69ab09222c7a552c7c0c1eef9ce627fc1affected · git
- 89ae9df09d2c1fb4a4eb495c113a7ce1dca34147 and later · before ddb9239828336b36d8a3ef5943fdffb2f55b6508affected · git
- 14d2eee0193ac3cd1bf3d014373449f0b8d35d6d and later · before 94083db751930b1540ddff2b54d4677549c57f81affected · git
- f580d27e8928828693df44ba2db0fffdbe11dfea and later · before 12c36c99655f325befe50c26842f7deca414c381affected · git
- f580d27e8928828693df44ba2db0fffdbe11dfea and later · before 10f293a07f9e10e988b0ae44e2e99c631f5a68e0affected · git
- 6.1.176 and later · before 6.1.178affected · semver
- 6.6.143 and later · before 6.6.145affected · semver
- 6.12.94 and later · before 6.12.96affected · semver
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Debian:12 | linux | before 6.1.180-1 | 6.1.180-1 |
| Debian:12 | linux-6.12 | before 6.12.100-1~deb12u1 | 6.12.100-1~deb12u1 |
| Debian:13 | linux | before 6.12.96-1 | 6.12.96-1 |
| Debian:14 | linux | before 7.1.4-1 | 7.1.4-1 |
Same product
linux: all recordsOther highest-scoring records for the same primary product.
- CVE-2022-0847A flaw was found in the way the "flags" member of the new pipe buffer structure was lacking proper initialization in copy_page_to_iter_pipe KEV89Now
- CVE-2021-22555Heap Out-Of-Bounds Write in Netfilter IP6T_SO_SET_REPLACEKEV85Now
- CVE-2016-5195Race condition in mm/gup.c in the Linux kernel 2.x through 4.x before 4.8.3 allows local users to gain privileges by leveraging incorrect haKEV83Now
Published before and after this one in the same product
- ← EarlierCVE-2026-64431Jul 25, 2026 · ntfs: avoid calling post_write_mst_fixup() for invalid index_block31Monitor
- ← EarlierCVE-2026-64433Jul 25, 2026 · Bluetooth: MGMT: Fix UAF of hci_conn_params in add_device_complete31Monitor
- Later →CVE-2026-64439Jul 25, 2026 · crypto: krb5 - filter out async aead implementations at alloc39Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| Linux Linux | 10f293a07f9e10e988b0ae44e2e99c631f5a68e0 | Vendor (CNA) |
| Linux Linux | 12c36c99655f325befe50c26842f7deca414c381 | Vendor (CNA) |
| Linux Linux | 6.1.178 | Vendor (CNA) |
| Linux Linux | 6.12.96 | Vendor (CNA) |
| Linux Linux | 6.18.39 | Vendor (CNA) |
| Linux Linux | 6.6.145 | Vendor (CNA) |
| Linux Linux | 7.1 | Vendor (CNA) |
| Linux Linux | 94083db751930b1540ddff2b54d4677549c57f81 | Vendor (CNA) |
| Linux Linux | a796ba4e61d5e14e07b79a359faac69f8f9b22a3 | Vendor (CNA) |
| Linux Linux | b8e274e69ab09222c7a552c7c0c1eef9ce627fc1 | Vendor (CNA) |
| Linux Linux | ddb9239828336b36d8a3ef5943fdffb2f55b6508 | Vendor (CNA) |
| debian:linux | 6.1.180-1 · Debian:12 | Package registry (OSV) |
| debian:linux-6.12 | 6.12.100-1~deb12u1 · Debian:12 | Package registry (OSV) |
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
No commit or PR link among the references.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
No credits in the CNA record.
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
No nightly-computed relations.
Chain candidates
An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.
—
Bug bounty scope
No known public program.
Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).
Technical details
Attack conditions
- Anyone who can reach it over the internet can trigger it.
- A low-privileged account is enough.
- No user action is required.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- high · data can be read
- Integrity
- high · data or configuration can be modified
- Availability
- high · the service can be disrupted
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- High
- Integrity impact
- High
- Availability impact
- High
Weakness class (CWE)
CWE-416 · Use After FreeCVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
nvd-secondary
Root cause
After a memory region is freed, another reference pointing to it is still used. By then, the same region may have been allocated for different data.
The bug in code
The whole CWE-416 classA representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.
Vulnerable
free(dev->buf);
/* ... another thread is still running ... */
process(dev->buf);Fixed
lock(&dev->lock);
free(dev->buf);
dev->buf = NULL;
unlock(&dev->lock);Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
MITRE has no CAPEC/ATT&CK mapping for this CWE.
Change log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (5 more)Show less
- git.kernel.org/stable/c/12c36c99655f325befe50c26842f7deca414c381
- git.kernel.org/stable/c/94083db751930b1540ddff2b54d4677549c57f81
- git.kernel.org/stable/c/a796ba4e61d5e14e07b79a359faac69f8f9b22a3
- git.kernel.org/stable/c/b8e274e69ab09222c7a552c7c0c1eef9ce627fc1
- git.kernel.org/stable/c/ddb9239828336b36d8a3ef5943fdffb2f55b6508
Vendor advisories and official records. Exploit/PoC links are deliberately left out.