crypto: lib/mpi - Add error checks
Get series with b4
b4 am [email protected]Versions newest first
- v2 Latest4 patches 0 repliesNew
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | Revert "lib/mpi: Extend the MPI library"include/ lib/ lib/ +9 more | +10 | 0 replies | |
| 2/4 | crypto: lib/mpi - Add error checks to extensioninclude/ lib/ lib/ +5 more | +128 | 0 replies | |
| 3/4 | crypto: dh - Check mpi_rshift errorscrypto/ | +2 | 0 replies | |
| 4/4 | crypto: rsa - Check MPI allocation errorscrypto/ | +12 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [v2 PATCH 0/4] crypto: lib/mpi - Add error checks
This patch series reverts MPI library extensions which are buggy as they carried assumptions from user-space that memory allocations always succeed. They were used by SM2 which itself has now been removed.
Ironically most of these library functions were previously in the kernel in a non-buggy form but were removed because they were unused.
About half of the extensions remain because they have found uses beyond SM2. For those error checks have been added.
Herbert Xu (4):
Revert "lib/mpi: Extend the MPI library"
crypto: lib/mpi - Add error checks to extension
crypto: dh - Check mpi_rshift errors
crypto: rsa - Check MPI allocation errors
crypto/dh.c | 4 +- crypto/rsa.c | 19 +- include/linux/mpi.h | 87 ++------- lib/crypto/mpi/Makefile | 1 - lib/crypto/mpi/mpi-add.c | 89 +++------ lib/crypto/mpi/mpi-bit.c | 168 ++--------------- lib/crypto/mpi/mpi-cmp.c | 46 +---- lib/crypto/mpi/mpi-div.c | 82 ++++----- lib/crypto/mpi/mpi-internal.h | 21 +-- lib/crypto/mpi/mpi-inv.c | 143 --------------- lib/crypto/mpi/mpi-mod.c | 148 +-------------- lib/crypto/mpi/mpi-mul.c | 29 ++- lib/crypto/mpi/mpicoder.c | 336 ---------------------------------- lib/crypto/mpi/mpih-mul.c | 25 --- lib/crypto/mpi/mpiutil.c | 184 +------------------ 15 files changed, 151 insertions(+), 1231 deletions(-) delete mode 100644 lib/crypto/mpi/mpi-inv.c
Signature · 1 line
2.39.2