{"id":"CVE-2024-26980","state":"PUBLISHED","title":"ksmbd: fix slab-out-of-bounds in smb2_allocate_rsp_buf","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: fix slab-out-of-bounds in smb2_allocate_rsp_buf\n\nIf ->ProtocolId is SMB2_TRANSFORM_PROTO_NUM, smb2 request size\nvalidation could be skipped. if request size is smaller than\nsizeof(struct smb2_query_info_req), slab-out-of-bounds read can happen in\nsmb2_allocate_rsp_buf(). This patch allocate response buffer after\ndecrypting transform request. smb3_decrypt_req() will validate transform\nrequest size and avoid slab-out-of-bound in smb2_allocate_rsp_buf().","publishedAt":"2024-05-01T05:26:56.744Z","updatedAt":"2026-08-05T11:28:49.476Z","severity":{"score":8.2,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"da21401372607c49972ea87a6edaafb36a17c325","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"b80ba648714e6d790d69610cf14656be222d0248","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"3160d9734453a40db248487f8204830879c207f1","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"0977f89722eceba165700ea384f075143f012085","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"c119f4ede3fa90a9463f50831761c28f989bfb20","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/server/server.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.15","versionType":"semver"},{"version":"5.15.159","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.88","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.29","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.8.8","status":"unaffected","lessThanOrEqual":"6.8.*","versionType":"semver"},{"version":"6.9","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/server.c"]}],"references":["https://git.kernel.org/stable/c/da21401372607c49972ea87a6edaafb36a17c325","https://git.kernel.org/stable/c/b80ba648714e6d790d69610cf14656be222d0248","https://git.kernel.org/stable/c/3160d9734453a40db248487f8204830879c207f1","https://git.kernel.org/stable/c/0977f89722eceba165700ea384f075143f012085","https://git.kernel.org/stable/c/c119f4ede3fa90a9463f50831761c28f989bfb20","https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/DAMSOZXJEPUOXW33WZYWCVAY7Z5S7OOY/","https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/4EZ6PJW7VOZ224TD7N4JZNU6KV32ZJ53/","https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/GCBZZEC7L7KTWWAS2NLJK6SO3IZIL4WW/"],"weaknesses":[],"ingestedAt":"2026-10-29T20:07:10.607Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/26xxx/CVE-2024-26980.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-26980","state":"PUBLISHED","datePublished":"2024-05-01T05:26:56.744Z","dateUpdated":"2026-08-05T11:28:49.476Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-02-19T14:20:24.204Z"},"containers":{"cna":{"title":"ksmbd: fix slab-out-of-bounds in smb2_allocate_rsp_buf","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: fix slab-out-of-bounds in smb2_allocate_rsp_buf\n\nIf ->ProtocolId is SMB2_TRANSFORM_PROTO_NUM, smb2 request size\nvalidation could be skipped. if request size is smaller than\nsizeof(struct smb2_query_info_req), slab-out-of-bounds read can happen in\nsmb2_allocate_rsp_buf(). This patch allocate response buffer after\ndecrypting transform request. smb3_decrypt_req() will validate transform\nrequest size and avoid slab-out-of-bound in smb2_allocate_rsp_buf()."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"da21401372607c49972ea87a6edaafb36a17c325","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"b80ba648714e6d790d69610cf14656be222d0248","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"3160d9734453a40db248487f8204830879c207f1","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"0977f89722eceba165700ea384f075143f012085","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"c119f4ede3fa90a9463f50831761c28f989bfb20","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/server/server.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.15","versionType":"semver"},{"version":"5.15.159","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.88","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.29","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.8.8","status":"unaffected","lessThanOrEqual":"6.8.*","versionType":"semver"},{"version":"6.9","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/server.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/da21401372607c49972ea87a6edaafb36a17c325"},{"url":"https://git.kernel.org/stable/c/b80ba648714e6d790d69610cf14656be222d0248"},{"url":"https://git.kernel.org/stable/c/3160d9734453a40db248487f8204830879c207f1"},{"url":"https://git.kernel.org/stable/c/0977f89722eceba165700ea384f075143f012085"},{"url":"https://git.kernel.org/stable/c/c119f4ede3fa90a9463f50831761c28f989bfb20"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H","baseScore":8.2,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:N - ksmbd is the in-kernel SMB server listening on TCP/445, and the malformed SMB2 transform PDU arrives directly from a remote peer over the network. No local access to the target is required.\nAC:L - A single hand-crafted 41-byte packet suffices — the attacker deterministically sets ProtocolId to SMB2_TRANSFORM_PROTO_NUM and places 0x0010 (SMB2_QUERY_INFO) in the Signature bytes that alias smb2_hdr->Command, with no race, no memory-layout luck, and no condition outside the attacker's control.\nPR:N - smb2_allocate_rsp_buf() runs in __handle_ksmbd_work() before decrypt_req(), init_rsp_hdr(), check_user_session() and ksmbd_verify_smb_message(), so the very first packet on a fresh TCP connection reaches it with no NEGOTIATE, session setup, or credentials of any kind.\nUI:N - The attacker's own TCP connection to port 445 drives the entire sequence; no administrator or local user on the target has to take any action.\nS:U - The out-of-bounds slab read and any resulting fault occur entirely within the kernel's own security authority, crossing no VM, IOMMU, or sandbox boundary.\nC:L - Two bytes of adjacent slab memory are read past the undersized request_buf and steer the response-buffer size (448 vs 448 + max_trans_size), which is observable to the remote attacker only as an allocation/timing oracle; the bytes themselves are never returned in the SMB response, so disclosure is limited rather than total.\nI:N - The defect is purely a read of InfoType/FileInfoClass — nothing is written out of bounds and no kernel state is corrupted on this path.\nA:H - The read crosses the slab object boundary and faults or reports on KASAN, KFENCE and MTE-instrumented kernels, panicking the box under panic_on_warn=1 or kasan.fault=panic, and an unauthenticated remote attacker can retrigger it from new connections at unlimited rate."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:28:49.476Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"5.15.159"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.1.88"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.6.29"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.8.8"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.9"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":5.5,"attackVector":"LOCAL","baseSeverity":"MEDIUM","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","integrityImpact":"NONE","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"LOW","confidentialityImpact":"NONE"}},{"other":{"type":"ssvc","content":{"timestamp":"2024-06-06T18:49:02.279322Z","id":"CVE-2024-26980","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"problemTypes":[{"descriptions":[{"type":"CWE","lang":"en","description":"CWE-noinfo Not enough information"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-11-06T15:14:12.175Z"}},{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/da21401372607c49972ea87a6edaafb36a17c325","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/b80ba648714e6d790d69610cf14656be222d0248","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/3160d9734453a40db248487f8204830879c207f1","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/0977f89722eceba165700ea384f075143f012085","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/c119f4ede3fa90a9463f50831761c28f989bfb20","tags":["x_transferred"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/DAMSOZXJEPUOXW33WZYWCVAY7Z5S7OOY/"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/4EZ6PJW7VOZ224TD7N4JZNU6KV32ZJ53/"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/GCBZZEC7L7KTWWAS2NLJK6SO3IZIL4WW/"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2025-11-04T17:14:51.828Z"}}]}}}