{"id":"CVE-2026-31432","state":"PUBLISHED","title":"ksmbd: fix OOB write in QUERY_INFO for compound requests","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: fix OOB write in QUERY_INFO for compound requests\n\nWhen a compound request such as READ + QUERY_INFO(Security) is received,\nand the first command (READ) consumes most of the response buffer,\nksmbd could write beyond the allocated buffer while building a security\ndescriptor.\n\nThe root cause was that smb2_get_info_sec() checked buffer space using\nppntsd_size from xattr, while build_sec_desc() often synthesized a\nsignificantly larger descriptor from POSIX ACLs.\n\nThis patch introduces smb_acl_sec_desc_scratch_len() to accurately\ncompute the final descriptor size beforehand, performs proper buffer\nchecking with smb2_calc_max_out_buf_len(), and uses exact-sized\nallocation + iov pinning.","publishedAt":"2026-04-22T08:15:10.873Z","updatedAt":"2026-10-30T12:24:13.087Z","severity":{"score":8.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"9f297df20d93411c0b4ddad7f88ba04a7cd36e77","status":"affected","lessThan":"533f84264e28c54a79257ea87d2f94a0fcc9a611","versionType":"git"},{"version":"e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d","status":"affected","lessThan":"850452af77f55d185f9445e1f7a1db53c5e4aad4","versionType":"git"},{"version":"e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d","status":"affected","lessThan":"d48c64fb80ad78b3dd29fb7d79b6ec7bd72bfc09","versionType":"git"},{"version":"e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d","status":"affected","lessThan":"075ea208c648cc2bcd616295b711d3637c61de45","versionType":"git"},{"version":"e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d","status":"affected","lessThan":"515c2daab46021221bdf406bef19bc90a44ec617","versionType":"git"},{"version":"e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d","status":"affected","lessThan":"fda9522ed6afaec45cabc198d8492270c394c7bc","versionType":"git"},{"version":"f2283680a80571ca82d710bc6ecd8f8beac67d63","status":"affected","versionType":"git"},{"version":"6.1.71","status":"affected","lessThan":"6.1.191","versionType":"semver"},{"version":"5.15.145","status":"affected","lessThan":"5.16","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/server/smb2pdu.c","fs/smb/server/smbacl.c","fs/smb/server/smbacl.h"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.6","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.6","versionType":"semver"},{"version":"6.1.191","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.143","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.81","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.22","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"6.19.12","status":"unaffected","lessThanOrEqual":"6.19.*","versionType":"semver"},{"version":"7.0","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/smb2pdu.c","fs/smb/server/smbacl.c","fs/smb/server/smbacl.h"]}],"references":["https://git.kernel.org/stable/c/533f84264e28c54a79257ea87d2f94a0fcc9a611","https://git.kernel.org/stable/c/850452af77f55d185f9445e1f7a1db53c5e4aad4","https://git.kernel.org/stable/c/d48c64fb80ad78b3dd29fb7d79b6ec7bd72bfc09","https://git.kernel.org/stable/c/075ea208c648cc2bcd616295b711d3637c61de45","https://git.kernel.org/stable/c/515c2daab46021221bdf406bef19bc90a44ec617","https://git.kernel.org/stable/c/fda9522ed6afaec45cabc198d8492270c394c7bc"],"weaknesses":[],"ingestedAt":"2026-10-30T12:40:04.423Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/31xxx/CVE-2026-31432.json","commit":"db8103c5921aac81d5d90efcf3745980dafabf49","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-31432","state":"PUBLISHED","datePublished":"2026-04-22T08:15:10.873Z","dateUpdated":"2026-10-30T12:24:13.087Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-03-09T15:48:24.089Z"},"containers":{"cna":{"title":"ksmbd: fix OOB write in QUERY_INFO for compound requests","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: fix OOB write in QUERY_INFO for compound requests\n\nWhen a compound request such as READ + QUERY_INFO(Security) is received,\nand the first command (READ) consumes most of the response buffer,\nksmbd could write beyond the allocated buffer while building a security\ndescriptor.\n\nThe root cause was that smb2_get_info_sec() checked buffer space using\nppntsd_size from xattr, while build_sec_desc() often synthesized a\nsignificantly larger descriptor from POSIX ACLs.\n\nThis patch introduces smb_acl_sec_desc_scratch_len() to accurately\ncompute the final descriptor size beforehand, performs proper buffer\nchecking with smb2_calc_max_out_buf_len(), and uses exact-sized\nallocation + iov pinning."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"9f297df20d93411c0b4ddad7f88ba04a7cd36e77","status":"affected","lessThan":"533f84264e28c54a79257ea87d2f94a0fcc9a611","versionType":"git"},{"version":"e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d","status":"affected","lessThan":"850452af77f55d185f9445e1f7a1db53c5e4aad4","versionType":"git"},{"version":"e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d","status":"affected","lessThan":"d48c64fb80ad78b3dd29fb7d79b6ec7bd72bfc09","versionType":"git"},{"version":"e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d","status":"affected","lessThan":"075ea208c648cc2bcd616295b711d3637c61de45","versionType":"git"},{"version":"e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d","status":"affected","lessThan":"515c2daab46021221bdf406bef19bc90a44ec617","versionType":"git"},{"version":"e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d","status":"affected","lessThan":"fda9522ed6afaec45cabc198d8492270c394c7bc","versionType":"git"},{"version":"f2283680a80571ca82d710bc6ecd8f8beac67d63","status":"affected","versionType":"git"},{"version":"6.1.71","status":"affected","lessThan":"6.1.191","versionType":"semver"},{"version":"5.15.145","status":"affected","lessThan":"5.16","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/server/smb2pdu.c","fs/smb/server/smbacl.c","fs/smb/server/smbacl.h"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.6","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.6","versionType":"semver"},{"version":"6.1.191","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.143","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.81","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.22","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"6.19.12","status":"unaffected","lessThanOrEqual":"6.19.*","versionType":"semver"},{"version":"7.0","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/smb2pdu.c","fs/smb/server/smbacl.c","fs/smb/server/smbacl.h"]}],"references":[{"url":"https://git.kernel.org/stable/c/533f84264e28c54a79257ea87d2f94a0fcc9a611"},{"url":"https://git.kernel.org/stable/c/850452af77f55d185f9445e1f7a1db53c5e4aad4"},{"url":"https://git.kernel.org/stable/c/d48c64fb80ad78b3dd29fb7d79b6ec7bd72bfc09"},{"url":"https://git.kernel.org/stable/c/075ea208c648cc2bcd616295b711d3637c61de45"},{"url":"https://git.kernel.org/stable/c/515c2daab46021221bdf406bef19bc90a44ec617"},{"url":"https://git.kernel.org/stable/c/fda9522ed6afaec45cabc198d8492270c394c7bc"}],"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, directly reachable over the network by any remote SMB client.\nAC:L - The attacker reliably triggers the OOB write by crafting a compound request (e.g., READ + QUERY_INFO(Security)) where the first command consumes most of the response buffer. No race condition or special conditions are needed.\nPR:L - The QUERY_INFO command requires a valid SMB session (checked by smb2_check_user_session), a tree connect, and an open file handle. Even guest access requires completing session setup, so low privileges are needed.\nUI:N - No user interaction is required; the attacker sends the compound request directly to the ksmbd server.\nS:U - The vulnerability results in kernel heap corruption within the same security authority (the kernel); no security boundary such as a VM or sandbox is crossed.\nC:H - The heap buffer overflow writes past the kvzalloc'd response buffer into adjacent kernel heap objects. This OOB write can be leveraged to corrupt adjacent structures and create information disclosure primitives.\nI:H - The OOB write corrupts kernel heap memory with attacker-influenced data (security descriptor content including SIDs and ACEs derived from file ACLs), enabling potential control flow hijacking or arbitrary write primitives.\nA:H - The heap buffer overflow corrupts adjacent kernel data structures, reliably causing kernel crashes or panics."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-10-30T12:24:13.087Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1.71","versionEndExcluding":"6.1.191"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6","versionEndExcluding":"6.6.143"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6","versionEndExcluding":"6.12.81"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6","versionEndExcluding":"6.18.22"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6","versionEndExcluding":"6.19.12"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6","versionEndExcluding":"7.0"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15.145"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}