Re: [PATCH] lightnvm: fix out-of-bounds write to array devices->info[]

From: Jens Axboe
Date: Fri Oct 16 2020 - 11:29:16 EST


On 10/16/20 8:33 AM, Colin King wrote:
> From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
>
> There is an off-by-one array check that can lead to a out-of-bounds
> write to devices->info[i]. Fix this by checking by using >= rather
> than > for the size check. Also replace hard-coded array size limit
> with ARRAY_SIZE on the array.

Applied, thanks.

--
Jens Axboe