android_kernel_xiaomi_sm8350/lib/mpi
Mark O'Donovan 61f5453e97 crypto: lib/mpi - avoid null pointer deref in mpi_cmp_ui()
[ Upstream commit 9e47a758b70167c9301d2b44d2569f86c7796f2d ]

During NVMeTCP Authentication a controller can trigger a kernel
oops by specifying the 8192 bit Diffie Hellman group and passing
a correctly sized, but zeroed Diffie Hellamn value.
mpi_cmp_ui() was detecting this if the second parameter was 0,
but 1 is passed from dh_is_pubkey_valid(). This causes the null
pointer u->d to be dereferenced towards the end of mpi_cmp_ui()

Signed-off-by: Mark O'Donovan <shiftee@posteo.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-23 11:00:03 +02:00
..
generic_mpih-add1.c
generic_mpih-lshift.c
generic_mpih-mul1.c
generic_mpih-mul2.c
generic_mpih-mul3.c
generic_mpih-rshift.c
generic_mpih-sub1.c
longlong.h
Makefile
mpi-bit.c
mpi-cmp.c crypto: lib/mpi - avoid null pointer deref in mpi_cmp_ui() 2023-09-23 11:00:03 +02:00
mpi-inline.h
mpi-internal.h
mpi-pow.c
mpicoder.c lib/mpi: Fix buffer overrun when SG is too long 2023-03-11 16:43:38 +01:00
mpih-cmp.c
mpih-div.c
mpih-mul.c
mpiutil.c lib/mpi: use kcalloc in mpi_resize 2021-09-15 09:47:29 +02:00