ksmbd: fix slab-out-of-bounds in smb2_allocate_rsp_buf
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: fix slab-out-of-bounds in smb2_allocate_rsp_buf
If ->ProtocolId is SMB2_TRANSFORM_PROTO_NUM, smb2 request size validation could be skipped. if request size is smaller than sizeof(struct smb2_query_info_req), slab-out-of-bounds read can happen in smb2_allocate_rsp_buf(). This patch allocate response buffer after decrypting transform request. smb3_decrypt_req() will validate transform request size and avoid slab-out-of-bound in smb2_allocate_rsp_buf().
From the CVE record · Linux
The Linux kernel's ksmbd component can skip SMB2 request-size validation when ProtocolId is SMB2_TRANSFORM_PROTO_NUM. An SMB2 transform request smaller than struct smb2_query_info_req can trigger a slab-out-of-bounds read in smb2_allocate_rsp_buf(). The input does not specify authentication requirements or user interaction.
Engineers running Linux kernels with ksmbd should check their deployments; affected versions are not specified.