[to-be-updated] lib-mpi-fix-off-by-one-check-on-index-no.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: lib/mpi: fix off-by-one check on index "no"
has been removed from the -mm tree.  Its filename was
     lib-mpi-fix-off-by-one-check-on-index-no.patch

This patch was dropped because an updated version will be merged

------------------------------------------------------
From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
Subject: lib/mpi: fix off-by-one check on index "no"

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")
Link: https://lkml.kernel.org/r/20200929131828.155691-1-colin.king@xxxxxxxxxxxxx
Fixes: a8ea8bdd9df9 ("lib/mpi: Extend the MPI library")
Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
Cc: Tianjia Zhang <tianjia.zhang@xxxxxxxxxxxxxxxxx>
Cc: David Howells <dhowells@xxxxxxxxxx>
Cc: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Cc: Waiman Long <longman@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 lib/mpi/mpiutil.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/lib/mpi/mpiutil.c~lib-mpi-fix-off-by-one-check-on-index-no
+++ a/lib/mpi/mpiutil.c
@@ -69,7 +69,7 @@ postcore_initcall(mpi_init);
  */
 MPI mpi_const(enum gcry_mpi_constants no)
 {
-	if ((int)no < 0 || no > MPI_NUMBER_OF_CONSTANTS)
+	if ((int)no < 0 || no >= MPI_NUMBER_OF_CONSTANTS)
 		pr_err("MPI: invalid mpi_const selector %d\n", no);
 	if (!constants[no])
 		pr_err("MPI: MPI subsystem not initialized\n");
_

Patches currently in -mm which might be from colin.king@xxxxxxxxxxxxx are





[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux