Commit e91cd26
committed
cifs: fix underflow in parse_server_interfaces()
jira LE-1907
cve CVE-2024-26828
Rebuild_History Non-Buildable kernel-5.14.0-427.31.1.el9_4
commit-author Dan Carpenter <dan.carpenter@linaro.org>
commit cffe487
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: fe856be ("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>
(cherry picked from commit cffe487)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>1 parent 594c05a commit e91cd26
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
609 | 609 | | |
610 | 610 | | |
611 | 611 | | |
612 | | - | |
| 612 | + | |
613 | 613 | | |
614 | 614 | | |
615 | 615 | | |
| |||
0 commit comments