Skip to content

Commit

Permalink
rxrpc: fix rxkad_verify_response()
Browse files Browse the repository at this point in the history
The error handling for if skb_copy_bits() fails was accidentally deleted
so the rxkad_decrypt_ticket() function is not called.

Fixes: 5d7edbc ("rxrpc: Get rid of the Rx ring")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Nov 18, 2022
1 parent ec8cd13 commit 101c1bb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions net/rxrpc/rxkad.c
Original file line number Diff line number Diff line change
Expand Up @@ -1165,8 +1165,10 @@ static int rxkad_verify_response(struct rxrpc_connection *conn,

eproto = tracepoint_string("rxkad_tkt_short");
abort_code = RXKADPACKETSHORT;
if (skb_copy_bits(skb, sizeof(struct rxrpc_wire_header) + sizeof(*response),
ticket, ticket_len) < 0)
ret = skb_copy_bits(skb, sizeof(struct rxrpc_wire_header) + sizeof(*response),
ticket, ticket_len);
if (ret < 0)
goto temporary_error_free_ticket;

ret = rxkad_decrypt_ticket(conn, server_key, skb, ticket, ticket_len,
&session_key, &expiry, _abort_code);
Expand Down

0 comments on commit 101c1bb

Please sign in to comment.