{"id":"CVE-2026-99388","state":"PUBLISHED","title":"smb: smbdirect: fix buffer length underflow in RDMA transfers","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nsmb: smbdirect: fix buffer length underflow in RDMA transfers\n\nWhen a remote buffer descriptor is larger than the remaining local\nbuffer, smbdirect_connection_rdma_xmit() clamps its length and sets\nbuf_len to zero. The common accounting code then subtracts the clamped\nlength from buf_len, causing it to underflow. If another descriptor\nfollows, the loop processes it with a wrapped remaining length and\nincludes memory beyond the local buffer in the RDMA transfer.\n\nA client can trigger an out-of-bounds kernel write with an SMB WRITE\nrequest, or an out-of-bounds kernel read with an SMB READ request, by\nsupplying multiple RDMA buffer descriptors with an oversized descriptor\nbefore the last one.\n\nRemove the premature assignment to buf_len. Subtracting the clamped length\nalready consumes the remaining buffer, so the next iteration stops and\nonly descriptors within the local buffer are used to build work requests.","publishedAt":"2026-11-19T14:23:27.698Z","updatedAt":"2026-11-22T11:08:01.580Z","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":"e628bf939aafb61fbc56e9bdac8795cea5127e25","status":"affected","lessThan":"5072f32330c71de91c1a844e7becaee48d743561","versionType":"git"},{"version":"e628bf939aafb61fbc56e9bdac8795cea5127e25","status":"affected","lessThan":"1f5c774488fa2dabe6667cb26888aaea39c4ead6","versionType":"git"},{"version":"e628bf939aafb61fbc56e9bdac8795cea5127e25","status":"affected","lessThan":"956968544ae647aa9a9534b58735f47922c85d44","versionType":"git"},{"version":"e628bf939aafb61fbc56e9bdac8795cea5127e25","status":"affected","lessThan":"7193241a49c958782ba4b8df06da3734d1e317d2","versionType":"git"},{"version":"c5aa74449a41d9c10900d82d2c2e62d5462ef932","status":"affected","versionType":"git"},{"version":"cf859267e639cff1f525bd050f370ea752cc25f7","status":"affected","versionType":"git"},{"version":"1c660940f525279bb23b5d99a591535e7c359efe","status":"affected","versionType":"git"},{"version":"ebdb872897dbb2425b6c9f7b7e2f5d9a8042a76a","status":"affected","versionType":"git"},{"version":"5.15.145","status":"affected","lessThan":"5.16","versionType":"semver"},{"version":"6.1.52","status":"affected","lessThan":"6.2","versionType":"semver"},{"version":"6.4.15","status":"affected","lessThan":"6.5","versionType":"semver"},{"version":"6.5.2","status":"affected","lessThan":"6.6","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/smbdirect/rw.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.6","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.6","versionType":"semver"},{"version":"6.12.117","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.61","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.2","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/smbdirect/rw.c"]}],"references":["https://git.kernel.org/stable/c/5072f32330c71de91c1a844e7becaee48d743561","https://git.kernel.org/stable/c/1f5c774488fa2dabe6667cb26888aaea39c4ead6","https://git.kernel.org/stable/c/956968544ae647aa9a9534b58735f47922c85d44","https://git.kernel.org/stable/c/7193241a49c958782ba4b8df06da3734d1e317d2"],"weaknesses":[],"ingestedAt":"2026-11-22T11:18:06.032Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/99xxx/CVE-2026-99388.json","commit":"247cc9beefd85903834df0592e88a44f4d599223","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-99388","state":"PUBLISHED","datePublished":"2026-11-19T14:23:27.698Z","dateUpdated":"2026-11-22T11:08:01.580Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-09-25T10:25:14.412Z"},"containers":{"cna":{"title":"smb: smbdirect: fix buffer length underflow in RDMA transfers","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nsmb: smbdirect: fix buffer length underflow in RDMA transfers\n\nWhen a remote buffer descriptor is larger than the remaining local\nbuffer, smbdirect_connection_rdma_xmit() clamps its length and sets\nbuf_len to zero. The common accounting code then subtracts the clamped\nlength from buf_len, causing it to underflow. If another descriptor\nfollows, the loop processes it with a wrapped remaining length and\nincludes memory beyond the local buffer in the RDMA transfer.\n\nA client can trigger an out-of-bounds kernel write with an SMB WRITE\nrequest, or an out-of-bounds kernel read with an SMB READ request, by\nsupplying multiple RDMA buffer descriptors with an oversized descriptor\nbefore the last one.\n\nRemove the premature assignment to buf_len. Subtracting the clamped length\nalready consumes the remaining buffer, so the next iteration stops and\nonly descriptors within the local buffer are used to build work requests."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"e628bf939aafb61fbc56e9bdac8795cea5127e25","status":"affected","lessThan":"5072f32330c71de91c1a844e7becaee48d743561","versionType":"git"},{"version":"e628bf939aafb61fbc56e9bdac8795cea5127e25","status":"affected","lessThan":"1f5c774488fa2dabe6667cb26888aaea39c4ead6","versionType":"git"},{"version":"e628bf939aafb61fbc56e9bdac8795cea5127e25","status":"affected","lessThan":"956968544ae647aa9a9534b58735f47922c85d44","versionType":"git"},{"version":"e628bf939aafb61fbc56e9bdac8795cea5127e25","status":"affected","lessThan":"7193241a49c958782ba4b8df06da3734d1e317d2","versionType":"git"},{"version":"c5aa74449a41d9c10900d82d2c2e62d5462ef932","status":"affected","versionType":"git"},{"version":"cf859267e639cff1f525bd050f370ea752cc25f7","status":"affected","versionType":"git"},{"version":"1c660940f525279bb23b5d99a591535e7c359efe","status":"affected","versionType":"git"},{"version":"ebdb872897dbb2425b6c9f7b7e2f5d9a8042a76a","status":"affected","versionType":"git"},{"version":"5.15.145","status":"affected","lessThan":"5.16","versionType":"semver"},{"version":"6.1.52","status":"affected","lessThan":"6.2","versionType":"semver"},{"version":"6.4.15","status":"affected","lessThan":"6.5","versionType":"semver"},{"version":"6.5.2","status":"affected","lessThan":"6.6","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/smbdirect/rw.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.6","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.6","versionType":"semver"},{"version":"6.12.117","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.61","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.2","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/smbdirect/rw.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/5072f32330c71de91c1a844e7becaee48d743561"},{"url":"https://git.kernel.org/stable/c/1f5c774488fa2dabe6667cb26888aaea39c4ead6"},{"url":"https://git.kernel.org/stable/c/956968544ae647aa9a9534b58735f47922c85d44"},{"url":"https://git.kernel.org/stable/c/7193241a49c958782ba4b8df06da3734d1e317d2"}],"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 - A remote SMB Direct client puts the bad descriptor lengths in the SMB2 READ ReadChannelInfo or SMB2 WRITE WriteChannelInfo of the PDU that ksmbd_conn_handler_loop reads via smb_direct_read; smb2_read/smb2_write then call smbdirect_connection_rdma_xmit. That listener binds AF_INET port 5445 for iWARP (TCP) and port 445 for RoCEv2, both routable IP.\nAC:L - The client chooses the descriptor lengths, and check_rdma_desc only requires their sum to cover Length or RemainingBytes, so an oversized descriptor followed by another one makes buf_len wrap in smbdirect_connection_rdma_xmit. The client opens the SMB Direct connection and the file itself; a modest overflow fits the connection's existing RDMA credit pool.\nPR:L - smb2_check_user_session drops SMB2 READ and WRITE that lack a valid session, and smb2_read/smb2_write then require a tree connect and an open file with FILE_READ_DATA or FILE_WRITE_DATA. That is an authenticated share user who already finished session setup before the descriptor loop runs.\nUI:N - The authenticated client alone opens the file and sends the SMB2 READ or WRITE whose ReadChannelInfo or WriteChannelInfo carries the descriptors.\nS:U - The HCA DMA stays inside the host kernel that built the SG list from the ksmbd buffer in smbdirect_connection_rdma_xmit, which is the same security authority as the corrupted memory.\nC:H - SMB2 READ calls smbdirect_connection_rdma_xmit with is_read false, and the unclamped later descriptor makes smbdirect_connection_rdma_get_sg_list RDMA-write memory past aux_payload_buf to the client rkey. The client-chosen descriptor length covers many pages of adjacent kernel memory.\nI:H - SMB2 WRITE calls smbdirect_connection_rdma_xmit with is_read true (DMA_FROM_DEVICE), so the same later descriptor RDMA-reads bytes from the client's registered buffer into kernel memory past the kvzalloc buffer in smb2_write_rdma. Those bytes are chosen by the client.\nA:H - That RDMA read writes attacker-controlled data over adjacent kernel heap after the kvzalloc/kvmalloc buffer, which is enough to oops the host. A length that runs off a vmalloc mapping also puts a NULL page from vmalloc_to_page into the SG list."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-22T11:08:01.580Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6","versionEndExcluding":"6.12.117"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6","versionEndExcluding":"6.18.61"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6","versionEndExcluding":"7.3.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6","versionEndExcluding":"7.4-rc1"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15.145"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1.52"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.4.15"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.5.2"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}