{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-21967","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2024-12-29T08:45:45.796Z","datePublished":"2025-04-01T15:47:02.364Z","dateUpdated":"2026-08-05T11:55:43.302Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-08-05T11:55:43.302Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: fix use-after-free in ksmbd_free_work_struct\n\n->interim_entry of ksmbd_work could be deleted after oplock is freed.\nWe don't need to manage it with linked list. The interim request could be\nimmediately sent whenever a oplock break wait is needed."}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":8.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:N - ksmbd is the in-kernel SMB server listening on TCP/445, and the entire trigger sequence (a CREATE requesting a batch oplock/write lease on one connection, a conflicting overwrite CREATE plus a close/disconnect on a second) is driven purely by remote SMB2 protocol traffic. No local access to the target is required.\nAC:L - The double `list_add` of the same `work->interim_entry` in `smb2_open()` is deterministic, not racy, and the attacker owns both connections so it chooses exactly when the peer's `oplock_info` is released relative to `ksmbd_free_work_struct()`, and can loop the sequence indefinitely. Per guidance, an attacker-created ordering and a use-after-free are Low.\nPR:L - Reaching `smb_grant_oplock()`/`smb_break_all_oplock()` requires a completed SESSION_SETUP, TREE_CONNECT and SMB2 CREATE, so an authenticated but otherwise unprivileged share account (including a mapped guest) is needed. This matches the scoring of the sibling post-authentication ksmbd oplock UAFs.\nUI:N - The attacker drives every step from its own two SMB sessions — take the oplock, issue the conflicting overwrite CREATE, then close or drop the first connection. No administrator or other client has to do anything.\nS:U - The list corruption and its consequences stay entirely within the kernel's own security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - The stale `interim_list` head lets `smb2_lease_break_noti()` treat reclaimed heap memory as a `struct ksmbd_work`, dereferencing its `conn`, `sess`, and `request_buf` fields, and `smb2_send_interim_resp()` then transmits data derived from that object back to the attacker — an arbitrary kernel memory disclosure primitive after a heap spray.\nI:H - `list_del()` in `ksmbd_free_work_struct()` writes two attacker-influenced kernel heap pointers at a fixed offset into a freed kmalloc-256 slot that the attacker can reclaim with a chosen object, and the fake-`ksmbd_work` path yields further controlled pointer writes and indirect calls, giving control-flow hijack.\nA:H - Even unweaponized, the `list_del` on freed memory trips `CONFIG_DEBUG_LIST`/`BUG()` or silently corrupts the slab, and walking the dangling `interim_list` oopses the ksmbd worker; the attacker can repeat it at will to keep the file server down."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/server/ksmbd_work.c","fs/smb/server/ksmbd_work.h","fs/smb/server/oplock.c","fs/smb/server/oplock.h"],"versions":[{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","lessThan":"fb776765bfc21d5e4ed03bb3d4406c2b86ff1ac3","status":"affected","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","lessThan":"62746ae3f5414244a96293e3b017be637b641280","status":"affected","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","lessThan":"eb51f6f59d19b92f6fe84d3873f958495ab32f0a","status":"affected","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","lessThan":"bb39ed47065455604729404729d9116868638d31","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/server/ksmbd_work.c","fs/smb/server/ksmbd_work.h","fs/smb/server/oplock.c","fs/smb/server/oplock.h"],"versions":[{"version":"5.15","status":"affected"},{"version":"0","lessThan":"5.15","status":"unaffected","versionType":"semver"},{"version":"6.6.84","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.12.20","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.13.8","lessThanOrEqual":"6.13.*","status":"unaffected","versionType":"semver"},{"version":"6.14","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.6.84"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.12.20"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.13.8"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.14"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/fb776765bfc21d5e4ed03bb3d4406c2b86ff1ac3"},{"url":"https://git.kernel.org/stable/c/62746ae3f5414244a96293e3b017be637b641280"},{"url":"https://git.kernel.org/stable/c/eb51f6f59d19b92f6fe84d3873f958495ab32f0a"},{"url":"https://git.kernel.org/stable/c/bb39ed47065455604729404729d9116868638d31"}],"title":"ksmbd: fix use-after-free in ksmbd_free_work_struct","x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":7.8,"attackVector":"LOCAL","baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","integrityImpact":"HIGH","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"LOW","confidentialityImpact":"HIGH"}},{"other":{"type":"ssvc","content":{"id":"CVE-2025-21967","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2025-04-16T13:14:51.011092Z"}}}],"problemTypes":[{"descriptions":[{"lang":"en","type":"CWE","cweId":"CWE-416","description":"CWE-416 Use After Free"}]}],"title":"CISA ADP Vulnrichment","providerMetadata":{"orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","shortName":"CISA-ADP","dateUpdated":"2025-04-16T13:19:52.457Z"}}]}}