linux-stable/lib/crypto/mpi
Tianjia Zhang ba3c557420 crypto: lib/mpi - Fix unexpected pointer access in mpi_ec_init
When the mpi_ec_ctx structure is initialized, some fields are not
cleared, causing a crash when referencing the field when the
structure was released. Initially, this issue was ignored because
memory for mpi_ec_ctx is allocated with the __GFP_ZERO flag.
For example, this error will be triggered when calculating the
Za value for SM2 separately.

Fixes: d58bb7e55a ("lib/mpi: Introduce ec implementation to MPI library")
Cc: stable@vger.kernel.org # v6.5
Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2023-12-22 12:30:19 +08:00
..
ec.c crypto: lib/mpi - Fix unexpected pointer access in mpi_ec_init 2023-12-22 12:30:19 +08:00
generic_mpih-add1.c crypto: lib - Move mpi into lib/crypto 2023-08-11 19:19:27 +08:00
generic_mpih-lshift.c crypto: lib - Move mpi into lib/crypto 2023-08-11 19:19:27 +08:00
generic_mpih-mul1.c crypto: lib - Move mpi into lib/crypto 2023-08-11 19:19:27 +08:00
generic_mpih-mul2.c crypto: lib - Move mpi into lib/crypto 2023-08-11 19:19:27 +08:00
generic_mpih-mul3.c crypto: lib - Move mpi into lib/crypto 2023-08-11 19:19:27 +08:00
generic_mpih-rshift.c crypto: lib - Move mpi into lib/crypto 2023-08-11 19:19:27 +08:00
generic_mpih-sub1.c crypto: lib - Move mpi into lib/crypto 2023-08-11 19:19:27 +08:00
longlong.h crypto: lib - Move mpi into lib/crypto 2023-08-11 19:19:27 +08:00
Makefile crypto: lib - Move mpi into lib/crypto 2023-08-11 19:19:27 +08:00
mpi-add.c crypto: lib - Move mpi into lib/crypto 2023-08-11 19:19:27 +08:00
mpi-bit.c crypto: lib - Move mpi into lib/crypto 2023-08-11 19:19:27 +08:00
mpi-cmp.c crypto: lib/mpi - avoid null pointer deref in mpi_cmp_ui() 2023-08-11 19:19:52 +08:00
mpi-div.c crypto: lib - Move mpi into lib/crypto 2023-08-11 19:19:27 +08:00
mpi-inline.h crypto: lib - Move mpi into lib/crypto 2023-08-11 19:19:27 +08:00
mpi-internal.h crypto: lib - Move mpi into lib/crypto 2023-08-11 19:19:27 +08:00
mpi-inv.c crypto: lib - Move mpi into lib/crypto 2023-08-11 19:19:27 +08:00
mpi-mod.c crypto: lib - Move mpi into lib/crypto 2023-08-11 19:19:27 +08:00
mpi-mul.c crypto: lib - Move mpi into lib/crypto 2023-08-11 19:19:27 +08:00
mpi-pow.c crypto: lib - Move mpi into lib/crypto 2023-08-11 19:19:27 +08:00
mpi-sub-ui.c crypto: lib - Move mpi into lib/crypto 2023-08-11 19:19:27 +08:00
mpicoder.c crypto: lib - Move mpi into lib/crypto 2023-08-11 19:19:27 +08:00
mpih-cmp.c crypto: lib - Move mpi into lib/crypto 2023-08-11 19:19:27 +08:00
mpih-div.c crypto: lib - Move mpi into lib/crypto 2023-08-11 19:19:27 +08:00
mpih-mul.c crypto: lib - Move mpi into lib/crypto 2023-08-11 19:19:27 +08:00
mpiutil.c crypto: lib - Move mpi into lib/crypto 2023-08-11 19:19:27 +08:00