Re: [PATCH] scsi: fix shift out-of-bounds in sg_build_indirect The num variable is set to 0. The variable num gets its value from scatter_elem_sz. However the minimum value of scatter_elem_sz is PAGE_SHIFT. So setting num to PAGE_SIZE when num < PAGE_SIZE.
From: David Hunter
Date: Mon Oct 06 2025 - 21:42:08 EST
On 10/6/25 13:46, Kshitij Paranjape wrote:
> Cc: <stable@xxxxxxxxxxxxxxx>
> Reported-by: syzbot+270f1c719ee7baab9941@xxxxxxxxxxxxxxxxxxxxxxxxx
> Closes: https://syzkaller.appspot.com/bug?extid=270f1c719ee7baab9941
> Signed-off-by: Kshitij Paranjape <kshitijvparanjape@xxxxxxxxx>
Hey Kshitij,
the formatting didn't quite work out the way you intended. For the next
version, please try to send it to Shuah and I first.