{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-22039","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2024-12-29T08:45:45.809Z","datePublished":"2025-04-16T14:11:56.975Z","dateUpdated":"2026-08-05T11:56:12.156Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-08-05T11:56:12.156Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: fix overflow in dacloffset bounds check\n\nThe dacloffset field was originally typed as int and used in an\nunchecked addition, which could overflow and bypass the existing\nbounds check in both smb_check_perm_dacl() and smb_inherit_dacl().\n\nThis could result in out-of-bounds memory access and a kernel crash\nwhen dereferencing the DACL pointer.\n\nThis patch converts dacloffset to unsigned int and uses\ncheck_add_overflow() to validate access to the DACL."}],"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; the malicious `dacloffset` arrives in an SMB2 SET_INFO security-descriptor payload over TCP/445 and is triggered by a subsequent SMB2 CREATE. No local access is needed.\nAC:L - The attacker fully controls the 32-bit `dacloffset` field and simply picks a value in 0xFFFFFFF8–0xFFFFFFFF to bypass the check; there is no race, no memory-layout guessing, and the trigger is two ordinary SMB2 requests that can be repeated at will.\nPR:L - The path requires an established SMB2 session and tree connect plus an open handle with write access, so valid (even minimal, non-admin) share credentials are needed — this is squarely post-authentication, not a handshake path.\nUI:N - The attacker plants the crafted security descriptor and re-opens the file entirely on their own; no action by an administrator or any other client is involved.\nS:U - The out-of-bounds access and resulting crash are confined to the kernel's own security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - `pdacl` is dereferenced roughly 4 GiB beyond a small kmalloc'd buffer and the ACE walk then reads further from there — an unbounded kernel-memory read, whose bytes are OR'd into `granted` and returned to the client in the maximal-access create context, and are persisted into on-disk ACLs by smb_inherit_dacl.\nI:H - The out-of-bounds bytes directly determine the DACL verdict and the granted access mask stored in `fp->daccess` (including WRITE_DAC/DELETE/GENERIC_ALL), so the Windows ACL enforcement layer can be defeated, and smb_inherit_dacl writes out-of-bounds heap contents into the security.NTACL xattr of newly created files.\nA:H - Dereferencing a pointer ~4 GiB past the allocation faults on any system where that address is not backed by the direct map, producing a kernel oops in the ksmbd worker (a panic with panic_on_oops); the attacker can repeat it at will."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/server/smbacl.c"],"versions":[{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","lessThan":"6a9cd9ff0fa2bcc30b2bfb8bdb161eb20e44b9dc","status":"affected","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","lessThan":"6b8d379048b168a0dff5ab1acb975b933f368514","status":"affected","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","lessThan":"443b373a4df5a2cb9f7b8c4658b2afedeb16397f","status":"affected","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","lessThan":"beff0bc9d69bc8e733f9bca28e2d3df5b3e10e42","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/smbacl.c"],"versions":[{"version":"5.15","status":"affected"},{"version":"0","lessThan":"5.15","status":"unaffected","versionType":"semver"},{"version":"6.12.23","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.13.11","lessThanOrEqual":"6.13.*","status":"unaffected","versionType":"semver"},{"version":"6.14.2","lessThanOrEqual":"6.14.*","status":"unaffected","versionType":"semver"},{"version":"6.15","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.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"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/6a9cd9ff0fa2bcc30b2bfb8bdb161eb20e44b9dc"},{"url":"https://git.kernel.org/stable/c/6b8d379048b168a0dff5ab1acb975b933f368514"},{"url":"https://git.kernel.org/stable/c/443b373a4df5a2cb9f7b8c4658b2afedeb16397f"},{"url":"https://git.kernel.org/stable/c/beff0bc9d69bc8e733f9bca28e2d3df5b3e10e42"}],"title":"ksmbd: fix overflow in dacloffset bounds check","x_generator":{"engine":"bippy-1.2.0"}}}}