{ "dataType": "CVE_RECORD", "dataVersion": "5.2", "cveMetadata": { "cveId": "CVE-2025-21945", "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "state": "PUBLISHED", "assignerShortName": "Linux", "dateReserved": "2024-12-29T08:45:45.790Z", "datePublished": "2025-04-01T15:41:08.471Z", "dateUpdated": "2026-08-05T11:55:30.419Z" }, "containers": { "cna": { "providerMetadata": { "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "shortName": "Linux", "dateUpdated": "2026-08-05T11:55:30.419Z" }, "descriptions": [ { "lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: fix use-after-free in smb2_lock\n\nIf smb_lock->zero_len has value, ->llist of smb_lock is not delete and\nflock is old one. It will cause use-after-free on error handling\nroutine." } ], "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 bug is triggered by a single crafted SMB2 LOCK PDU whose lock elements carry Length==0 and attacker-chosen flags. No local access to the target is needed.\nAC:L - The zero_len path is taken deterministically whenever the client sets a lock element's Length to 0, and the stale `flock`/`flags` reuse and skipped `list_del` follow unconditionally; there is no race and the attacker can repeat the request indefinitely to groom the heap.\nPR:L - SMB2_LOCK is gated by smb2_check_user_session() and requires an open file handle from ksmbd_lookup_fd_slow(), so the attacker needs valid credentials for an exported share — an ordinary low-privileged SMB account, not administrative rights.\nUI:N - The attacker drives the whole sequence (session setup, tree connect, create, lock) from its own connection; no action by any local user or administrator is required.\nS:U - The corruption is confined to kernel heap objects managed by the SMB server and the VFS lock layer, within the same security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - The freed ksmbd_lock stays linked in lock_list and in the global per-connection lock_list, and the stale file_lock is re-read by vfs_lock_file() and by other connections' conflict scans, so reclaimed heap contents are dereferenced and can be leveraged to disclose kernel memory.\nI:H - The dangling entries produce a double-free plus list_del writes through attacker-groomable freed slab objects, giving the write primitives needed to corrupt adjacent kernel structures and hijack control flow.\nA:H - Use of freed ksmbd_lock/file_lock memory and the resulting double-free and corrupted list traversals reliably oops or panic the kernel, taking down the whole file server." } ] } ], "affected": [ { "product": "Linux", "vendor": "Linux", "defaultStatus": "unaffected", "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "programFiles": [ "fs/smb/server/smb2pdu.c" ], "versions": [ { "version": "0626e6641f6b467447c81dd7678a69c66f7746cf", "lessThan": "410ce35a2ed6d0e114132bba29af49b69880c8c7", "status": "affected", "versionType": "git" }, { "version": "0626e6641f6b467447c81dd7678a69c66f7746cf", "lessThan": "8573571060ca466cbef2c6f03306b2cc7b883506", "status": "affected", "versionType": "git" }, { "version": "0626e6641f6b467447c81dd7678a69c66f7746cf", "lessThan": "a0609097fd10d618aed4864038393dd75131289e", "status": "affected", "versionType": "git" }, { "version": "0626e6641f6b467447c81dd7678a69c66f7746cf", "lessThan": "636e021646cf9b52ddfea7c809b018e91f2188cb", "status": "affected", "versionType": "git" }, { "version": "0626e6641f6b467447c81dd7678a69c66f7746cf", "lessThan": "84d2d1641b71dec326e8736a749b7ee76a9599fc", "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/smb2pdu.c" ], "versions": [ { "version": "5.15", "status": "affected" }, { "version": "0", "lessThan": "5.15", "status": "unaffected", "versionType": "semver" }, { "version": "6.1.131", "lessThanOrEqual": "6.1.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.6.83", "lessThanOrEqual": "6.6.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.12.19", "lessThanOrEqual": "6.12.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.13.7", "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.1.131" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.15", "versionEndExcluding": "6.6.83" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.15", "versionEndExcluding": "6.12.19" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.15", "versionEndExcluding": "6.13.7" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.15", "versionEndExcluding": "6.14" } ] } ] } ], "references": [ { "url": "https://git.kernel.org/stable/c/410ce35a2ed6d0e114132bba29af49b69880c8c7" }, { "url": "https://git.kernel.org/stable/c/8573571060ca466cbef2c6f03306b2cc7b883506" }, { "url": "https://git.kernel.org/stable/c/a0609097fd10d618aed4864038393dd75131289e" }, { "url": "https://git.kernel.org/stable/c/636e021646cf9b52ddfea7c809b018e91f2188cb" }, { "url": "https://git.kernel.org/stable/c/84d2d1641b71dec326e8736a749b7ee76a9599fc" } ], "title": "ksmbd: fix use-after-free in smb2_lock", "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-21945", "role": "CISA Coordinator", "options": [ { "Exploitation": "none" }, { "Automatable": "no" }, { "Technical Impact": "total" } ], "version": "2.0.3", "timestamp": "2025-04-16T13:14:55.516245Z" } } } ], "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.605Z" } }, { "title": "CVE Program Container", "references": [ { "url": "https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html" } ], "providerMetadata": { "orgId": "af854a3a-2127-422b-91ae-364da2661108", "shortName": "CVE", "dateUpdated": "2025-11-03T19:39:45.983Z" } } ] } }