diff mbox series

[net-next] rxrpc: fix rxkad_verify_response()

Message ID Y3XmKhBt5fclE6XC@kili (mailing list archive)
State Accepted
Commit 101c1bb6c55691d01c73915c118828f7ca17a049
Delegated to: Netdev Maintainers
Headers show
Series [net-next] rxrpc: fix rxkad_verify_response() | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 8 of 8 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch warning WARNING: From:/Signed-off-by: email address mismatch: 'From: Dan Carpenter <error27@gmail.com>' != 'Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>' WARNING: line length of 86 exceeds 80 columns
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Dan Carpenter Nov. 17, 2022, 7:43 a.m. UTC
The error handling for if skb_copy_bits() fails was accidentally deleted
so the rxkad_decrypt_ticket() function is not called.

Fixes: 5d7edbc9231e ("rxrpc: Get rid of the Rx ring")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
This applies to net-next.  It might go throught some kind of an AFS
tree judging by the S-o-b tags on the earlier patches?  Tracking
everyone's trees is really complicated now that I'm dealing with over
300 trees.

 net/rxrpc/rxkad.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

David Howells Nov. 17, 2022, 12:10 p.m. UTC | #1
Dan Carpenter <error27@gmail.com> wrote:

> The error handling for if skb_copy_bits() fails was accidentally deleted
> so the rxkad_decrypt_ticket() function is not called.
> 
> Fixes: 5d7edbc9231e ("rxrpc: Get rid of the Rx ring")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Acked-by: David Howells <dhowells@redhat.com>
patchwork-bot+netdevbpf@kernel.org Nov. 18, 2022, 12:10 p.m. UTC | #2
Hello:

This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Thu, 17 Nov 2022 10:43:38 +0300 you wrote:
> The error handling for if skb_copy_bits() fails was accidentally deleted
> so the rxkad_decrypt_ticket() function is not called.
> 
> Fixes: 5d7edbc9231e ("rxrpc: Get rid of the Rx ring")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> This applies to net-next.  It might go throught some kind of an AFS
> tree judging by the S-o-b tags on the earlier patches?  Tracking
> everyone's trees is really complicated now that I'm dealing with over
> 300 trees.
> 
> [...]

Here is the summary with links:
  - [net-next] rxrpc: fix rxkad_verify_response()
    https://git.kernel.org/netdev/net-next/c/101c1bb6c556

You are awesome, thank you!
diff mbox series

Patch

diff --git a/net/rxrpc/rxkad.c b/net/rxrpc/rxkad.c
index 2706e59bf992..110a5550c0a6 100644
--- a/net/rxrpc/rxkad.c
+++ b/net/rxrpc/rxkad.c
@@ -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);