CVE-2023-54162
published high CVSS 3.1 · 8.8ksmbd: fix possible memory leak in smb2_lock()
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linuxe2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 to < bfe8372ef2dbdce97f13b21d76e2080ddeef5a79 · e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 to < 6bf555ed8938444466c3d7f3252eb874a518f293 · e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 to < 11d38f8a0c19763e34d2093b5ecb640e012cb2d2 · e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 to < d3ca9f7aeba793d74361d88a8800b2f205c9236b · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux5.15 (affected) · 0 to < 5.15 (unaffected · semver) · 5.15.145 through 5.15.* (unaffected · semver) · 6.1.16 through 6.1.* (unaffected · semver) · 6.2.3 through 6.2.* (unaffected · semver) · 6.3 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
Description
In the Linux kernel, the following vulnerability has been resolved: ksmbd: fix possible memory leak in smb2_lock() argv needs to be free when setup_async_work fails or when the current process is woken up.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 8.8 / 10
- Severity
- high
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Scenarios
- en: AV:N - smb2_lock()/smb2_cancel() are ksmbd SMB2 command handlers reached directly from remote packets on TCP/445, with no local access required. The entire race is driven by SMB2_LOCK, SMB2_CANCEL and SMB2_CLOSE PDUs sent by a remote client. AC:L - The attacker controls both sides of every race — it issues the blocking SMB2_LOCK, then pipelines SMB2_CANCEL/SMB2_CLOSE, which ksmbd dispatches as concurrent workqueue items on the same connection, and can repeat indefinitely across many connections. The argv leak itself is deterministic on every cancelled or woken deferred lock. PR:L - SMB2_LOCK requires an established session, tree connect and an open file handle, so a low-privileged authenticated SMB user (or a guest-mapped account on typical NAS/embedded configs) suffices; no administrative rights are needed. Upstream reproduced the sibling bugs on this same path "by an authenticated SMB client". UI:N - The attacker drives the whole sequence from its own SMB connection; no action by any local user or administrator is needed. The contending lock, the cancel and the close are all attacker-initiated. S:U - The corruption and resource exhaustion stay within the kernel's own security authority on the SMB server host. No VM, IOMMU or sandbox boundary is crossed. C:H - The stale cancel_fn/cancel_argv leave a use-after-free on a freed struct file_lock (192-byte file_lock_cache, easily sprayed by an attacker holding many byte-range locks) and on the freed ksmbd_work, giving read access to reallocated kernel heap contents. UAF of this kind is treated as High confidentiality impact. I:H - The UAF is exercised through an indirect call — smb2_cancel() invokes cancel_fn from a freed ksmbd_work, and smb2_remove_blocked_lock()'s wake_up() walks a freed waitqueue calling curr->func() — providing a control-flow hijack / arbitrary-write primitive once the slab is reclaimed with attacker-shaped data. A:H - The double list_del of work->fp_entry writes through LIST_POISON and oopses a kworker while it holds fp->f_lock, permanently wedging that spinlock; the file_lock UAF crashes the kernel outright, and the unbounded argv leak drives the server to memory exhaustion. All are remotely repeatable.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 to < bfe8372ef2dbdce97f13b21d76e2080ddeef5a79 (affected · git)e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 to < 6bf555ed8938444466c3d7f3252eb874a518f293 (affected · git)e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 to < 11d38f8a0c19763e34d2093b5ecb640e012cb2d2 (affected · git)e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 to < d3ca9f7aeba793d74361d88a8800b2f205c9236b (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 5.15 (affected)0 to < 5.15 (unaffected · semver)5.15.145 through 5.15.* (unaffected · semver)6.1.16 through 6.1.* (unaffected · semver)6.2.3 through 6.2.* (unaffected · semver)6.3 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
4Provider assertions
1Linux · cna
ksmbd: fix possible memory leak in smb2_lock()
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- d799b80182531f24837544ced531ced11f291564e5564523af75efd8ecb8f930
- Ingested
- 23 Sep 2026, 08:15:07 UTC
- Source record
- Official CVE record