lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABPSWR6B0M=nos=wBpjidXMPVYVDKYi0i+-ufuR460_m48vjVw@mail.gmail.com>
Date: Mon, 6 Oct 2025 23:30:25 +0530
From: vivek yadav <vivekyadav1207731111@...il.com>
To: Kshitij Paranjape <kshitijvparanjape@...il.com>
Cc: "Martin K . Petersen" <martin.petersen@...cle.com>, Doug Gilbert <dgilbert@...erlog.com>, 
	"James E . J . Bottomley" <James.Bottomley@...senpartnership.com>, skhan@...uxfoundation.org, 
	david.hunter.linux@...il.com, khalid@...nel.org, linux-scsi@...r.kernel.org, 
	linux-kernel@...r.kernel.org, linux-kernel-mentees@...ts.linux.dev, 
	stable@...r.kernel.org, syzbot+270f1c719ee7baab9941@...kaller.appspotmail.com
Subject: 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.

Hi Kshitij,

Subject line of your patch should not exceed more than 80 characters
[recommended]
Please check your patch format.

~~vivek

On Mon, Oct 6, 2025 at 11:17 PM Kshitij Paranjape
<kshitijvparanjape@...il.com> wrote:
>
> Cc: <stable@...r.kernel.org>
> Reported-by: syzbot+270f1c719ee7baab9941@...kaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=270f1c719ee7baab9941
> Signed-off-by: Kshitij Paranjape <kshitijvparanjape@...il.com>
> ---
>  drivers/scsi/sg.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
> index effb7e768165..9ae41bb256d7 100644
> --- a/drivers/scsi/sg.c
> +++ b/drivers/scsi/sg.c
> @@ -1888,6 +1888,7 @@ sg_build_indirect(Sg_scatter_hold * schp, Sg_fd * sfp, int buff_size)
>                 if (num < PAGE_SIZE) {
>                         scatter_elem_sz = PAGE_SIZE;
>                         scatter_elem_sz_prev = PAGE_SIZE;
> +                       num = scatter_elem_sz;
>                 } else
>                         scatter_elem_sz_prev = num;
>         }
> --
> 2.43.0
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ