[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3f79a1f7-8b7c-420c-0e70-d3b5880222bf@kernel.dk>
Date: Wed, 21 Apr 2021 09:15:52 -0600
From: Jens Axboe <axboe@...nel.dk>
To: Dan Carpenter <dan.carpenter@...cle.com>,
Christoph Hellwig <hch@....de>
Cc: linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 1/2] ataflop: potential out of bounds in do_format()
On 4/21/21 4:18 AM, Dan Carpenter wrote:
> The function uses "type" as an array index:
>
> q = unit[drive].disk[type]->queue;
>
> Unfortunately the bounds check on "type" isn't done until later in the
> function. Fix this by moving the bounds check to the start.
Applied this and 2/2, thanks Dan.
--
Jens Axboe
Powered by blists - more mailing lists