All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Christie <michael.christie@oracle.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: martin.petersen@oracle.com,
	james.bottomley@hansenpartnership.com,
	linux-scsi@vger.kernel.org, target-devel@vger.kernel.org
Subject: Re: [PATCH 1/4] scsi: target: Fix WRITE_SAME NDOB size check
Date: Mon, 20 Jun 2022 11:03:03 -0500	[thread overview]
Message-ID: <2de356ad-2b40-b3ad-57bf-2194e1decc64@oracle.com> (raw)
In-Reply-To: <YrAXdTWu4/xsdWgq@infradead.org>

On 6/20/22 1:45 AM, Christoph Hellwig wrote:
> On Sun, Jun 19, 2022 at 11:25:33AM -0500, michael.christie@oracle.com wrote:
>> sg_write_same allows it. We found the bug because some user just decided
>> to do:
>>
>> sg_write_same ... -nbod .. /dev/sdb
>>
>> and it crashed the box.
> 
> Oh.
> 
>> I didn't know about the MI_REPORT_SUPPORTED_OPERATION_CODES part of it.
>> I don't need support for the feature. I just want to fix the crash.
>> I prefer just returning failure since nothing ever has ever used it if
>> other people prefer that as well.
> 
> I think the feature is generally useful, and I know Martin had patches
> to use it in Linux.  But I think a minimal fix for the remotely

I'll work with Martin to find if there is an oracle user to test and on a
longer term feature addition.

> exploitable crash has the highest priority.  Where does it crash?

It crashes when we first access the sg in file and iblock's
execute_write_same functions.

> Maybe we just need a better sanity check somewhere if a command
> claims to transfer data but has not payload?

I'll look into it and send a patch.




  reply	other threads:[~2022-06-20 16:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-17  3:04 [PATCH 0/4] target unmap/writespace fixes and enhancements Mike Christie
2022-06-17  3:04 ` [PATCH 1/4] scsi: target: Fix WRITE_SAME NDOB size check Mike Christie
2022-06-19  6:22   ` Christoph Hellwig
2022-06-19 16:25     ` michael.christie
2022-06-20  6:45       ` Christoph Hellwig
2022-06-20 16:03         ` Mike Christie [this message]
2022-06-17  3:04 ` [PATCH 2/4] scsi: target: Fix WRITE_SAME NDOB handling in file Mike Christie
2022-06-19  6:25   ` Christoph Hellwig
2022-06-19 16:26     ` michael.christie
2022-06-19 16:38       ` michael.christie
2022-06-17  3:04 ` [PATCH 3/4] scsi: target: Fix WRITE_SAME NDOB handling in iblock Mike Christie
2022-06-19  6:28   ` Christoph Hellwig
2022-06-17  3:04 ` [PATCH 4/4] scsi: target: Detect unmap support post configuration Mike Christie
2022-06-19  6:29   ` Christoph Hellwig

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=2de356ad-2b40-b3ad-57bf-2194e1decc64@oracle.com \
    --to=michael.christie@oracle.com \
    --cc=hch@infradead.org \
    --cc=james.bottomley@hansenpartnership.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=target-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.