{"id":"CVE-2025-22042","state":"PUBLISHED","title":"ksmbd: add bounds check for create lease context","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: add bounds check for create lease context\n\nAdd missing bounds check for create lease context.","publishedAt":"2025-04-16T14:12:03.896Z","updatedAt":"2026-08-05T11:56:15.350Z","severity":{"score":8.1,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"629dd37acc336ad778979361c351e782053ea284","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"60b7207893a8a06c78441934931a08fdad63f18e","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"800c482c9ef5910f05e3a713943c67cc6c1d4939","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"a41cd52f00907a040ca22c73d4805bb79b0d0972","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"9a1b6ea955e6c7b29939a6d98701202f9d9644ec","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"bab703ed8472aa9d109c5f8c1863921533363dae","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/server/oplock.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.15","versionType":"semver"},{"version":"6.1.134","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.87","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.23","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.13.11","status":"unaffected","lessThanOrEqual":"6.13.*","versionType":"semver"},{"version":"6.14.2","status":"unaffected","lessThanOrEqual":"6.14.*","versionType":"semver"},{"version":"6.15","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/server/oplock.c"]}],"references":["https://git.kernel.org/stable/c/629dd37acc336ad778979361c351e782053ea284","https://git.kernel.org/stable/c/60b7207893a8a06c78441934931a08fdad63f18e","https://git.kernel.org/stable/c/800c482c9ef5910f05e3a713943c67cc6c1d4939","https://git.kernel.org/stable/c/a41cd52f00907a040ca22c73d4805bb79b0d0972","https://git.kernel.org/stable/c/9a1b6ea955e6c7b29939a6d98701202f9d9644ec","https://git.kernel.org/stable/c/bab703ed8472aa9d109c5f8c1863921533363dae","https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html"],"weaknesses":[],"ingestedAt":"2026-10-29T20:08:39.238Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/22xxx/CVE-2025-22042.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-22042","state":"PUBLISHED","datePublished":"2025-04-16T14:12:03.896Z","dateUpdated":"2026-08-05T11:56:15.350Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-12-29T08:45:45.809Z"},"containers":{"cna":{"title":"ksmbd: add bounds check for create lease context","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: add bounds check for create lease context\n\nAdd missing bounds check for create lease context."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"629dd37acc336ad778979361c351e782053ea284","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"60b7207893a8a06c78441934931a08fdad63f18e","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"800c482c9ef5910f05e3a713943c67cc6c1d4939","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"a41cd52f00907a040ca22c73d4805bb79b0d0972","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"9a1b6ea955e6c7b29939a6d98701202f9d9644ec","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"bab703ed8472aa9d109c5f8c1863921533363dae","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/server/oplock.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.15","versionType":"semver"},{"version":"6.1.134","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.87","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.23","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.13.11","status":"unaffected","lessThanOrEqual":"6.13.*","versionType":"semver"},{"version":"6.14.2","status":"unaffected","lessThanOrEqual":"6.14.*","versionType":"semver"},{"version":"6.15","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/server/oplock.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/629dd37acc336ad778979361c351e782053ea284"},{"url":"https://git.kernel.org/stable/c/60b7207893a8a06c78441934931a08fdad63f18e"},{"url":"https://git.kernel.org/stable/c/800c482c9ef5910f05e3a713943c67cc6c1d4939"},{"url":"https://git.kernel.org/stable/c/a41cd52f00907a040ca22c73d4805bb79b0d0972"},{"url":"https://git.kernel.org/stable/c/9a1b6ea955e6c7b29939a6d98701202f9d9644ec"},{"url":"https://git.kernel.org/stable/c/bab703ed8472aa9d109c5f8c1863921533363dae"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","baseScore":8.1,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:N - The bug is in ksmbd, the in-kernel SMB server, and is triggered purely by a malformed SMB2 CREATE request with a crafted \"RqLs\" create context arriving over TCP/445. No local access is needed.\nAC:L - A single deterministically crafted request (DataOffset=0, DataLength=0, CreateContextsLength=20) passes smb2_find_context_vals() and reaches the fixed-offset read every time; there is no race, no timing window, and no dependence on memory layout for the disclosure.\nPR:L - SMB2_CREATE is dispatched only after a valid SessionId (ksmbd_session_lookup) and tree connect, so the attacker needs SMB credentials — though a guest-mapped share reduces this to effectively none.\nUI:N - The attacker triggers the flaw entirely by sending packets to the listening ksmbd service; no action by any local user or administrator is required.\nS:U - The out-of-bounds read stays within the kernel's own heap and the impact is confined to the kernel security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - Up to 36 bytes of adjacent kernel heap memory are read, and the first 16 (the lease key) are echoed verbatim to the remote attacker in the CREATE response via create_lease_buf(), giving a repeatable heap-disclosure oracle with attacker-controlled allocation sizing for grooming — sufficient to defeat KASLR and leak neighbouring object contents.\nI:N - The flaw is a read-only over-read; the memcpy destinations are correctly sized kzalloc'd objects and no attacker-controlled out-of-bounds write or control-flow corruption occurs.\nA:H - Because the attacker sizes the kvmalloc'd request buffer, the read can be positioned to run off the end of a vmalloc-backed allocation into a guard page, and on KASAN/hardened kernels it triggers an oops/panic, taking down the SMB server and potentially the system."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:56:15.350Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.1.134"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.6.87"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.12.23"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.13.11"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.14.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.15"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2025-11-03T19:41:24.487Z"}}]}}}