Commit 7810cc1e authored by YOSHIFUJI Hideaki's avatar YOSHIFUJI Hideaki Committed by James Morris

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: default avatarYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: default avatarDmitry Kasatkin <dmitry.kasatkin@intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarJames Morris <james.l.morris@oracle.com>
parent 88b62b91
...@@ -162,6 +162,8 @@ static int digsig_verify_rsa(struct key *key, ...@@ -162,6 +162,8 @@ static int digsig_verify_rsa(struct key *key,
memset(out1, 0, head); memset(out1, 0, head);
memcpy(out1 + head, p, l); memcpy(out1 + head, p, l);
kfree(p);
err = pkcs_1_v1_5_decode_emsa(out1, len, mblen, out2, &len); err = pkcs_1_v1_5_decode_emsa(out1, len, mblen, out2, &len);
if (err) if (err)
goto err; goto err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment