All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org,
	Hari Mishal <harimishal1@gmail.com>,
	Keith Busch <kbusch@kernel.org>, Jens Axboe <axboe@kernel.dk>,
	Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>
Subject: Re: [PATCH 1/2] nvme: bound ns descriptor header and body to identify buffer
Date: Mon, 13 Jul 2026 08:42:23 +0200	[thread overview]
Message-ID: <20260713064223.GC29416@lst.de> (raw)
In-Reply-To: <2026070931-stopping-cost-239a@gregkh>

On Thu, Jul 09, 2026 at 02:30:32PM +0200, Greg Kroah-Hartman wrote:
> From: Hari Mishal <harimishal1@gmail.com>
> 
> nvme_identify_ns_descs() allocates a buffer and gives it to the
> controller, which populates it and then iterates the buffer with
> variable byte increments that vary by type and body size.  But, there is
> no bounds check inside the iteration itself except the loop bound
> itself.  Fix this by checking and stopping iteration if the next header
> or its declared body would go past the buffer itself.

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>



      parent reply	other threads:[~2026-07-13  6:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-09 12:30 [PATCH 1/2] nvme: bound ns descriptor header and body to identify buffer Greg Kroah-Hartman
2026-07-09 12:30 ` [PATCH 2/2] nvme: clamp FDP nruhsd to allocated RUH status descriptor count Greg Kroah-Hartman
2026-07-13  6:43   ` Christoph Hellwig
2026-07-13  6:42 ` Christoph Hellwig [this message]

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=20260713064223.GC29416@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=gregkh@linuxfoundation.org \
    --cc=harimishal1@gmail.com \
    --cc=kbusch@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /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.