smb: client: fix reparse buffer bounds in cifs_query_reparse_point()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
c13b779d26b3702fba8f7d5fe757aba5bda85fd0| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
smb: client: fix reparse buffer bounds in cifs_query_reparse_point()
In cifs_query_reparse_point(), the start >= end check before casting to struct reparse_data_buffer * only ensures the start pointer is within the response. It fails to verify that there is enough space remaining for the fixed 8-byte header of the structure.
If a server provides a DataOffset that leaves less than 8 bytes remaining, the check passes, but subsequent reads of ReparseTag and ReparseDataLength will occur out-of-bounds.
Fix this by ensuring the remaining space is at least the size of the reparse_data_buffer structure before accessing its fields.
From the CVE record · Linux
The Linux kernel SMB client does not check that a reparse-point response has enough space for an 8-byte header. A server can provide a DataOffset that passes the existing bounds check but causes the client to read beyond the response buffer. The input does not specify authentication or user-interaction requirements.
Engineers running Linux kernels with the SMB client should check their versions against the vendor advisory; affected versions are not specified.