Skip to content

Commit d61482b

Browse files
dhowellsgregkh
authored andcommitted
rxrpc: Fix re-decryption of RESPONSE packets
commit 0422e7a upstream. If a RESPONSE packet gets a temporary failure during processing, it may end up in a partially decrypted state - and then get requeued for a retry. Fix this by just discarding the packet; we will send another CHALLENGE packet and thereby elicit a further response. Similarly, discard an incoming CHALLENGE packet if we get an error whilst generating a RESPONSE; the server will send another CHALLENGE. Fixes: 17926a7 ("[AF_RXRPC]: Provide secure RxRPC sockets for use by userspace and kernel both") Closes: https://sashiko.dev/#/patchset/20260422161438.2593376-4-dhowells@redhat.com Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: Jeffrey Altman <jaltman@auristor.com> cc: Simon Horman <horms@kernel.org> cc: linux-afs@lists.infradead.org cc: stable@kernel.org Link: https://patch.msgid.link/20260423200909.3049438-3-dhowells@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent f1c6bd0 commit d61482b

2 files changed

Lines changed: 2 additions & 13 deletions

File tree

include/trace/events/rxrpc.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,6 @@
232232
EM(rxrpc_conn_put_unidle, "PUT unidle ") \
233233
EM(rxrpc_conn_put_work, "PUT work ") \
234234
EM(rxrpc_conn_queue_challenge, "QUE chall ") \
235-
EM(rxrpc_conn_queue_retry_work, "QUE retry-wk") \
236235
EM(rxrpc_conn_queue_rx_work, "QUE rx-work ") \
237236
EM(rxrpc_conn_see_new_service_conn, "SEE new-svc ") \
238237
EM(rxrpc_conn_see_reap_service, "SEE reap-svc") \

net/rxrpc/conn_event.c

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,6 @@ void rxrpc_process_delayed_final_acks(struct rxrpc_connection *conn, bool force)
344344
static void rxrpc_do_process_connection(struct rxrpc_connection *conn)
345345
{
346346
struct sk_buff *skb;
347-
int ret;
348347

349348
if (test_and_clear_bit(RXRPC_CONN_EV_CHALLENGE, &conn->events))
350349
rxrpc_secure_connection(conn);
@@ -353,17 +352,8 @@ static void rxrpc_do_process_connection(struct rxrpc_connection *conn)
353352
* connection that each one has when we've finished with it */
354353
while ((skb = skb_dequeue(&conn->rx_queue))) {
355354
rxrpc_see_skb(skb, rxrpc_skb_see_conn_work);
356-
ret = rxrpc_process_event(conn, skb);
357-
switch (ret) {
358-
case -ENOMEM:
359-
case -EAGAIN:
360-
skb_queue_head(&conn->rx_queue, skb);
361-
rxrpc_queue_conn(conn, rxrpc_conn_queue_retry_work);
362-
break;
363-
default:
364-
rxrpc_free_skb(skb, rxrpc_skb_put_conn_work);
365-
break;
366-
}
355+
rxrpc_process_event(conn, skb);
356+
rxrpc_free_skb(skb, rxrpc_skb_put_conn_work);
367357
}
368358
}
369359

0 commit comments

Comments
 (0)