[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251203061046.GA16562@lst.de>
Date: Wed, 3 Dec 2025 07:10:46 +0100
From: Christoph Hellwig <hch@....de>
To: Eugene Korenevsky <ekorenevsky@...yun.com>
Cc: Keith Busch <kbusch@...nel.org>, Jens Axboe <axboe@...nel.dk>,
Christoph Hellwig <hch@....de>, Sagi Grimberg <sagi@...mberg.me>,
linux-nvme@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4] nvme: nvme_identify_ns_descs: prevent oob
On Tue, Dec 02, 2025 at 09:22:13PM +0300, Eugene Korenevsky wrote:
> @@ -1563,11 +1564,14 @@ static int nvme_identify_ns_descs(struct nvme_ctrl *ctrl,
> goto free_data;
> }
>
> - for (pos = 0; pos < NVME_IDENTIFY_DATA_SIZE; pos += len) {
> - struct nvme_ns_id_desc *cur = data + pos;
> + for (pos = 0; pos < NVME_IDENTIFY_DATA_SIZE - sizeof(*cur); pos += len) {
Please avoid the overly long line.
Otherwise this looks fine.
Powered by blists - more mailing lists