diff options
| author | Gilad Ben-Yossef <[email protected]> | 2018-07-24 14:12:45 +0000 |
|---|---|---|
| committer | Herbert Xu <[email protected]> | 2018-08-03 10:06:05 +0000 |
| commit | e30368f3f3ee72e20aa4b1fdb6ec2c5ddcd7e2d1 (patch) | |
| tree | cd7737142db38b21aa8975b9ae8db21a9f21ed87 /lib/mpi/mpi-pow.c | |
| parent | crypto: ccree - remove cipher ivgen left overs (diff) | |
| download | kernel-e30368f3f3ee72e20aa4b1fdb6ec2c5ddcd7e2d1.tar.gz kernel-e30368f3f3ee72e20aa4b1fdb6ec2c5ddcd7e2d1.zip | |
crypto: ccree - zero all of request ctx before use
In certain error path req_ctx->iv was being freed despite
not being allocated because it was not initialized to NULL.
Rather than play whack a mole with the structure various
field, zero it before use.
This fixes a kernel panic that may occur if an invalid
buffer size was requested triggering the bug above.
Fixes: 63ee04c8b491 ("crypto: ccree - add skcipher support")
Reported-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Gilad Ben-Yossef <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-pow.c')
0 files changed, 0 insertions, 0 deletions
