* [PATCH] digsig: Fix memory leakage in digsig_verify_rsa().
@ 2013-01-25 10:19 YOSHIFUJI Hideaki
0 siblings, 0 replies; only message in thread
From: YOSHIFUJI Hideaki @ 2013-01-25 10:19 UTC (permalink / raw)
To: dmitry.kasatkin, torvalds, linux-kernel; +Cc: yoshfuji
digsig_verify_rsa() does not free kmalloc'ed buffer returned by
mpi_get_buffer().
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
---
lib/digsig.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/digsig.c b/lib/digsig.c
index 8c0e629..dc2be7e 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;
--
1.7.9.5
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-01-25 10:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-25 10:19 [PATCH] digsig: Fix memory leakage in digsig_verify_rsa() YOSHIFUJI Hideaki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox