[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <163729506337.21244.16949206676665346595.b4-ty@oracle.com>
Date: Thu, 18 Nov 2021 23:16:36 -0500
From: "Martin K. Petersen" <martin.petersen@...cle.com>
To: gregkh@...uxfoundation.org, dgilbert@...erlog.com,
jejb@...ux.ibm.com, George Kennedy <george.kennedy@...cle.com>
Cc: "Martin K . Petersen" <martin.petersen@...cle.com>,
linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 linux-next] scsi: scsi_debug: fix type in min_t to avoid stack OOB
On Tue, 9 Nov 2021 13:57:27 -0500, George Kennedy wrote:
> Change min_t() to use type "u32" instead of type "int" to
> avoid stack out of bounds. With min_t() type "int" the values get
> sign extended and the larger value gets used causing stack out of bounds.
>
> BUG: KASAN: stack-out-of-bounds in memcpy include/linux/fortify-string.h:191 [inline]
> BUG: KASAN: stack-out-of-bounds in sg_copy_buffer+0x1de/0x240 lib/scatterlist.c:976
> Read of size 127 at addr ffff888072607128 by task syz-executor.7/18707
>
> [...]
Applied to 5.16/scsi-fixes, thanks!
[1/1] scsi: scsi_debug: fix type in min_t to avoid stack OOB
https://git.kernel.org/mkp/scsi/c/36e07d7ede88
--
Martin K. Petersen Oracle Linux Engineering
Powered by blists - more mailing lists