diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2013-01-25 16:54:20 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-02-11 09:04:42 -0800 |
commit | 9cf4086a08c444f2455f0bdd13b9d545e7c7d1fa (patch) | |
tree | fa2a07353df414c24d050a179fdc0c310b3ae9cf /lib | |
parent | 0876398286b0ae58c17c03d30cd89217d7d98e31 (diff) |
digsig: Fix memory leakage in digsig_verify_rsa()
commit 7810cc1e7721220f1ed2a23ca95113d6434f6dcd upstream.
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>
Signed-off-by: James Morris <james.l.morris@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/digsig.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/digsig.c b/lib/digsig.c index 8c0e62975c88..dc2be7ed1765 100644 --- a/lib/digsig.c +++ b/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; |