summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFrank Sorenson <sorenson@redhat.com>2026-08-17 12:16:51 -0500
committerPaulo Alcantara <pc@manguebit.org>2026-08-24 17:08:53 -0300
commit62656b024efc21c3230eade1a847f25871c3d2bb (patch)
treef81e92d0de5fdc8a4c5ba2533e525e0c040c61b5 /include
parent3fffaa8a646c5bee02a553014b7f80e6ea2a76dd (diff)
smb: client: fix ALIGN() overflow in symlink_data() error context loop
The check added by commit 7d9a7f1f96cd ("smb/client: fix possible infinite loop and oob read in symlink_data()") compared the post-ALIGN length against the remaining buffer, but ALIGN() itself can overflow: for ErrorDataLength near UINT32_MAX (e.g. 0xFFFFFFF9), ALIGN(x, 8) wraps to 0, so the subsequent bounds check passes, and the loop advances by zero bytes leaving 'p' pointing into stale data. Fix by checking the raw ErrorDataLength against the remaining space before applying ALIGN(), then checking again after. Since raw_len is bounded by the buffer, raw_len + 7 cannot overflow, so the second check is an exact post-alignment bounds guard. Fixes: 76894f3e2f71 ("cifs: improve symlink handling for smb2+") Cc: stable@vger.kernel.org Signed-off-by: Frank Sorenson <sorenson@redhat.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Paulo Alcantara <pc@manguebit.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions