lkml.org 
[lkml]   [2021]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2] scsi: scsi_debug: fix type in min_t to avoid stack OOB
From
Hi Martin,

On 11/3/2021 9:59 PM, Martin K. Petersen wrote:
> George,
>
>> Change min_t() to use type "unsigned int" 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.
> This needs to be reconciled with the following commits:
>
> f347c26836c2 scsi: scsi_debug: Fix out-of-bound read in resp_report_tgtpgs()
> 4e3ace0051e7 scsi: scsi_debug: Fix out-of-bound read in resp_readcap16()

The proposed patch should supersede the above commits.

George
>
> Thanks!
>

\
 
 \ /
  Last update: 2021-11-04 14:55    [W:0.067 / U:5.996 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site