Re: [PATCH][next] lib/mpi: fix off-by-one check on index "no"

From: Herbert Xu
Date: Wed Sep 30 2020 - 06:13:07 EST


On Tue, Sep 29, 2020 at 02:18:28PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
>
> There is an off-by-one range check on the upper limit of
> index "no". Fix this by changing the > comparison to >=
>
> Addresses-Coverity: ("Out-of-bounds read")
> Fixes: a8ea8bdd9df9 ("lib/mpi: Extend the MPI library")
> Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
> ---
> lib/mpi/mpiutil.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

Could you resend this with a cc to linux-crypto?

Thanks,
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt