kernel_samsung_a53x/lib/mpi
Tianjia Zhang 03315f608b crypto: lib/mpi - Fix unexpected pointer access in mpi_ec_init
[ Upstream commit ba3c5574203034781ac4231acf117da917efcd2a ]

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: d58bb7e55a8a ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-18 12:13:33 +01:00
..
ec.c crypto: lib/mpi - Fix unexpected pointer access in mpi_ec_init 2024-11-18 12:13:33 +01:00
generic_mpih-add1.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
generic_mpih-lshift.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
generic_mpih-mul1.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
generic_mpih-mul2.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
generic_mpih-mul3.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
generic_mpih-rshift.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
generic_mpih-sub1.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
longlong.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mpi-add.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mpi-bit.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mpi-cmp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mpi-div.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mpi-inline.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mpi-internal.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mpi-inv.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mpi-mod.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mpi-mul.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mpi-pow.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mpi-sub-ui.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mpicoder.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mpih-cmp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mpih-div.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mpih-mul.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mpiutil.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00