CVE-2026-31718: ksmbd: fix use-after-free in __ksmbd_close_fd() via durable scavenger
Noroxi assessment
Priority: Monitor (action score 39/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.35% (FIRST EPSS).
- Anyone who can reach it over the internet can trigger it. No account or password is required. No user action is required. No special conditions are required; it is repeatable.
- Fixed version: Linux Linux 0000a7780e0e446a28a273572f6ea8f7f582f694, 235e32320a470fcd3998fb3774f2290a0eb302a1, 3d6682726c2d3a46d31dae88b8166786b09b03ad.
Low priority for now. Upgrade to Linux Linux 0000a7780e0e446a28a273572f6ea8f7f582f694, 235e32320a470fcd3998fb3774f2290a0eb302a1, 3d6682726c2d3a46d31dae88b8166786b09b03ad 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 in __ksmbd_close_fd() via durable scavenger When a durable file handle survives session disconnect (TCP close without SMB2_LOGOFF), session_fd_check() sets fp->conn = NULL to preserve the handle for later reconnection. However, it did not clean up the byte-range locks on fp->lock_list. Later, when the durable scavenger thread times out and calls __ksmbd_close_fd(NULL, fp), the lock cleanup loop did: spin_lock(&fp->conn->llist_lock); This caused a slab use-after-free because fp->conn was NULL and the original connection object had already been freed by ksmbd_tcp_disconnect(). The root cause is asymmetric cleanup: lock entries (smb_lock->clist) were left dangling on the freed conn->lock_list while fp->conn was nulled out. To fix this issue properly, we need to handle the lifetime of smb_lock->clist across three paths: - Safely skip clist deletion when list is empty and fp->conn is NULL. - Remove the lock from the old connection's lock_list in session_fd_check() - Re-add the lock to the new connection's lock_list in ksmbd_reopen_durable_fd().
- Published
- May 1, 2026
- Updated
- Aug 5, 2026
- EPSS
- 0.3% · 29th percentile
- CWE
- CWE-416
Report tools
Action score
39
Monitor
Low priority for now.
- CVSS
- 39 / 40 · 9.8 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · 0.3%
CNA vs NVD score
- NVD
- —
- CNA · Linux
- 9.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.
Is your version affected? Check itNoroxi 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.6.32 and later · before 6.7
- linux linux kernel6.9 and later · before 6.12.84
- linux linux kernel6.13 and later · before 6.18.25
- linux linux kernel6.19 and later · before 7.0.2
- 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
- 6.9affected
- 8df4bcdb0a4232192b2445256c39b787d58ef14d and later · before 0000a7780e0e446a28a273572f6ea8f7f582f694affected · git
- c8efcc786146a951091588e5fa7e3c754850cb3c and later · before e33c65f011980b4ad4abfd93585ec2079856368faffected · git
- c8efcc786146a951091588e5fa7e3c754850cb3c and later · before 3d6682726c2d3a46d31dae88b8166786b09b03adaffected · git
- c8efcc786146a951091588e5fa7e3c754850cb3c and later · before b34fc42cfe922e551f7a27d3ac3bb016e41d7dd9affected · git
- c8efcc786146a951091588e5fa7e3c754850cb3c and later · before 235e32320a470fcd3998fb3774f2290a0eb302a1affected · git
- 6.6.32 and later · before 6.6.140affected · semver
- before 6.9not affected · semver
- 6.6.140 and later · up to and including 6.6.*not affected · semver
- 6.12.84 and later · up to and including 6.12.*not affected · semver
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Debian:13 | linux | before 6.12.85-1 | 6.12.85-1 |
| Debian:14 | linux | before 7.0.3-1 | 7.0.3-1 |
Same product
linux: all recordsOther highest-scoring records for the same primary product.
- CVE-2026-31431crypto: algif_aead - Revert to operating out-of-placeKEV90Now
- 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
Published before and after this one in the same product
- ← EarlierCVE-2026-31716May 1, 2026 · fs/ntfs3: validate rec->used in journal-replay file record check31Monitor
- ← EarlierCVE-2026-31717May 1, 2026 · ksmbd: validate owner of durable handle on reconnect35Monitor
- Later →CVE-2026-31720May 1, 2026 · usb: gadget: f_uac1_legacy: validate control request size31Monitor
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 | 0000a7780e0e446a28a273572f6ea8f7f582f694 | Vendor (CNA) |
| Linux Linux | 235e32320a470fcd3998fb3774f2290a0eb302a1 | Vendor (CNA) |
| Linux Linux | 3d6682726c2d3a46d31dae88b8166786b09b03ad | Vendor (CNA) |
| Linux Linux | 6.6.140 | Vendor (CNA) |
| Linux Linux | b34fc42cfe922e551f7a27d3ac3bb016e41d7dd9 | Vendor (CNA) |
| Linux Linux | e33c65f011980b4ad4abfd93585ec2079856368f | Vendor (CNA) |
| debian:linux | 6.12.85-1 · Debian:13 | 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.
No history yet (it accumulates with the daily EPSS job).
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.
- No account or password is required.
- 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
- None
- 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:N/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 (4 more)Show less
Vendor advisories and official records. Exploit/PoC links are deliberately left out.