aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQiushi Wu <wu000273@umn.edu>2020-05-22 13:45:18 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-05-27 17:37:44 +0200
commite7980748ed5a609a0a011c400a3fb620fa6f34d6 (patch)
tree034b1fb8643b86871de63d3e4fcfec7e8f56164d
parent0ce2f76e97d8ff16565d86b1d43645c4fabd38fa (diff)
downloadlinux-yocto-e7980748ed5a609a0a011c400a3fb620fa6f34d6.tar.gz
linux-yocto-e7980748ed5a609a0a011c400a3fb620fa6f34d6.tar.bz2
linux-yocto-e7980748ed5a609a0a011c400a3fb620fa6f34d6.zip
rxrpc: Fix a memory leak in rxkad_verify_response()
commit f45d01f4f30b53c3a0a1c6c1c154acb7ff74ab9f upstream. A ticket was not released after a call of the function "rxkad_decrypt_ticket" failed. Thus replace the jump target "temporary_error_free_resp" by "temporary_error_free_ticket". Fixes: 8c2f826dc3631 ("rxrpc: Don't put crypto buffers on the stack") Signed-off-by: Qiushi Wu <wu000273@umn.edu> Signed-off-by: David Howells <dhowells@redhat.com> cc: Markus Elfring <Markus.Elfring@web.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--net/rxrpc/rxkad.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/rxrpc/rxkad.c b/net/rxrpc/rxkad.c
index cea16838d588..dce7bdc73de4 100644
--- a/net/rxrpc/rxkad.c
+++ b/net/rxrpc/rxkad.c
@@ -1118,7 +1118,7 @@ static int rxkad_verify_response(struct rxrpc_connection *conn,
ret = rxkad_decrypt_ticket(conn, skb, ticket, ticket_len, &session_key,
&expiry, _abort_code);
if (ret < 0)
- goto temporary_error_free_resp;
+ goto temporary_error_free_ticket;
/* use the session key from inside the ticket to decrypt the
* response */
@@ -1200,7 +1200,6 @@ protocol_error:
temporary_error_free_ticket:
kfree(ticket);
-temporary_error_free_resp:
kfree(response);
temporary_error:
/* Ignore the response packet if we got a temporary error such as