From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: George Kennedy <george.kennedy@oracle.com>
Cc: gregkh@linuxfoundation.org, jejb@linux.ibm.com,
martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org, dan.carpenter@oracle.com
Subject: Re: [PATCH v2] scsi: scsi_debug: fix type in min_t to avoid stack OOB
Date: Wed, 03 Nov 2021 21:59:43 -0400 [thread overview]
Message-ID: <yq11r3wr8ck.fsf@ca-mkp.ca.oracle.com> (raw)
In-Reply-To: <1635861997-987-1-git-send-email-george.kennedy@oracle.com> (George Kennedy's message of "Tue, 2 Nov 2021 09:06:37 -0500")
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()
Thanks!
--
Martin K. Petersen Oracle Linux Engineering
next prev parent reply other threads:[~2021-11-04 1:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-02 14:06 [PATCH v2] scsi: scsi_debug: fix type in min_t to avoid stack OOB George Kennedy
2021-11-02 21:21 ` Douglas Gilbert
2021-11-04 1:59 ` Martin K. Petersen [this message]
2021-11-04 13:54 ` George Kennedy
2021-11-05 3:32 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=yq11r3wr8ck.fsf@ca-mkp.ca.oracle.com \
--to=martin.petersen@oracle.com \
--cc=dan.carpenter@oracle.com \
--cc=george.kennedy@oracle.com \
--cc=gregkh@linuxfoundation.org \
--cc=jejb@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox