linux/fs/smb
Dan Carpenter cffe487026 cifs: fix underflow in parse_server_interfaces()
In this loop, we step through the buffer and after each item we check
if the size_left is greater than the minimum size we need.  However,
the problem is that "bytes_left" is type ssize_t while sizeof() is type
size_t.  That means that because of type promotion, the comparison is
done as an unsigned and if we have negative bytes left the loop
continues instead of ending.

Fixes: fe856be475 ("CIFS: parse and store info on iface queries")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
2024-02-11 19:07:08 -06:00
..
client cifs: fix underflow in parse_server_interfaces() 2024-02-11 19:07:08 -06:00
common ksmbd: fix wrong name of SMB2_CREATE_ALLOCATION_SIZE 2023-12-08 10:11:33 -06:00
server ksmbd: free aux buffer if ksmbd_iov_pin_rsp_read fails 2024-02-07 20:23:37 -06:00
Kconfig
Makefile