ksmbd: pin conn during async oplock break notification
Affects ksmbd in Linux kernel 6.6.84 through 6.6.147 and similar stable branches, when a connection teardown races an oplock break notification. Fixed in 6.6.148, 6.12.101, 6.18.42 and 7.1.6.
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- How many real-world setups can hit the bug, from the vendor's advisory and CISA data. It does not know your setup.What do these mean? →
- Unclear
- Fix
- Fixed in 6.6.148, 6.12.101, 6.14, 6.18.42, 7.1.6
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
- Exploitation: none
- Automatable: yes
- Technical impact: total
Summary
The Linux kernel's ksmbd component, the in-kernel SMB server used for file sharing, is affected. A race during connection teardown can leave a worker thread using a connection object that has already been freed when sending oplock or lease break notifications, which can cause memory corruption or a crash.
Summarized by anthropic/claude-haiku-5.5. Verify details against the original sources.
Read the original description
In the Linux kernel, the following vulnerability has been resolved: ksmbd: pin conn during async oplock break notification smb2_oplock_break_noti() and smb2_lease_break_noti() store a ksmbd_conn pointer in an async ksmbd_work and then queue that work on ksmbd-io. The work only increments conn->r_count, which prevents teardown from passing the pending-request wait after the increment, but it does not pin the struct ksmbd_conn object. If connection teardown races with an oplock break notification, the last conn reference can be dropped before the queued worker finishes. The worker then uses the freed conn in ksmbd_conn_write() and ksmbd_conn_r_count_dec(). Take a real conn reference when publishing the conn pointer to the async work item, and drop it after the notification work has decremented r_count. Apply the same lifetime rule to lease break notification, which uses the same work->conn pattern.
Timeline
- CVE published
- CISA SSVC assessment
Exploitation: none · Automatable: yes · Technical impact: total
- Record last updated
Affected versions
- Linux Linux
From 6.6.84 · fixed in 6.6.148; From 6.12.20 · fixed in 6.12.101; From 6.13.8 · fixed in 6.14
- Linux Linux
6.14
- KernelLinux
fixed in 6.6.148; From 6.7.0 · fixed in 6.12.101; From 6.13.0 · fixed in 6.18.42; From 6.14.0 · fixed in 7.1.6
References 6
git.kernel.org
Questions about CVE-2026-68381
What does this mean?
When a client's SMB connection is torn down at the same moment the server sends an oplock break notification, a queued worker can still use the connection object after it has been freed. This is a use-after-free in the ksmbd kernel SMB server. The fix pins the connection so it stays valid until the notification finishes.Source: git.kernel.org
Am I affected, and how do I check?
The listed ranges cover Linux kernel 6.6.84 to 6.6.147, 6.12.20 to 6.12.100, 6.13.8 to 6.13.x before 6.14, and kernel branches up to 6.18.41 and 7.1.5. Check the running kernel with uname -r, and check whether the ksmbd module is loaded with lsmod | grep ksmbd.Source: git.kernel.org
What should I do about it?
Update to a kernel release that includes the fix for your branch: 6.6.148, 6.12.101, 6.18.42, or 7.1.6 or later. The advisory data gives no separate workaround, so the kernel update is the step to take.Source: git.kernel.org
Is it being exploited?
It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.Source: cve.now feed data