dect
/
linux-2.6
Archived
1
0
Fork 0

digsig: Fix memory leakage in digsig_verify_rsa()

digsig_verify_rsa() does not free kmalloc'ed buffer returned by
mpi_get_buffer().

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: James Morris <james.l.morris@oracle.com>
master
YOSHIFUJI Hideaki 10 years ago committed by James Morris
parent 88b62b915b
commit 7810cc1e77
  1. 2
      lib/digsig.c

@ -162,6 +162,8 @@ static int digsig_verify_rsa(struct key *key,
memset(out1, 0, head);
memcpy(out1 + head, p, l);
kfree(p);
err = pkcs_1_v1_5_decode_emsa(out1, len, mblen, out2, &len);
if (err)
goto err;