Patch "rxrpc: Fix oob challenge leak in cleanup after notification failure" has been added to the 7.1-stable tree
gregkh at linuxfoundation.org
gregkh at linuxfoundation.org
Mon Jul 20 03:53:48 PDT 2026
This is a note to let you know that I've just added the patch titled
rxrpc: Fix oob challenge leak in cleanup after notification failure
to the 7.1-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
rxrpc-fix-oob-challenge-leak-in-cleanup-after-notification-failure.patch
and it can be found in the queue-7.1 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable at vger.kernel.org> know about it.
>From 092275882aec4a70ba55c3efb66fff947c81656a Mon Sep 17 00:00:00 2001
From: David Howells <dhowells at redhat.com>
Date: Wed, 24 Jun 2026 17:38:14 +0100
Subject: rxrpc: Fix oob challenge leak in cleanup after notification failure
From: David Howells <dhowells at redhat.com>
commit 092275882aec4a70ba55c3efb66fff947c81656a upstream.
Fix rxrpc_notify_socket_oob() to return an indication of failure in the
event that it failed to queue a packet and fix rxrpc_post_challenge() to
clean up the connection ref in such an event.
Fixes: 5800b1cf3fd8 ("rxrpc: Allow CHALLENGEs to the passed to the app for a RESPONSE")
Link: https://sashiko.dev/#/patchset/20260616155749.2125907-1-dhowells%40redhat.com
Signed-off-by: David Howells <dhowells at redhat.com>
cc: Marc Dionne <marc.dionne at auristor.com>
cc: Jeffrey Altman <jaltman at auristor.com>
cc: Simon Horman <horms at kernel.org>
cc: linux-afs at lists.infradead.org
cc: stable at kernel.org
Link: https://patch.msgid.link/20260624163819.3017002-8-dhowells@redhat.com
Signed-off-by: Jakub Kicinski <kuba at kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
---
net/rxrpc/ar-internal.h | 4 ++--
net/rxrpc/conn_event.c | 9 +++++++--
net/rxrpc/oob.c | 7 +++++--
3 files changed, 14 insertions(+), 6 deletions(-)
--- a/net/rxrpc/ar-internal.h
+++ b/net/rxrpc/ar-internal.h
@@ -1355,9 +1355,9 @@ static inline struct rxrpc_net *rxrpc_ne
}
/*
- * out_of_band.c
+ * oob.c
*/
-void rxrpc_notify_socket_oob(struct rxrpc_call *call, struct sk_buff *skb);
+bool rxrpc_notify_socket_oob(struct rxrpc_call *call, struct sk_buff *skb);
void rxrpc_add_pending_oob(struct rxrpc_sock *rx, struct sk_buff *skb);
int rxrpc_sendmsg_oob(struct rxrpc_sock *rx, struct msghdr *msg, size_t len);
--- a/net/rxrpc/conn_event.c
+++ b/net/rxrpc/conn_event.c
@@ -436,7 +436,7 @@ static bool rxrpc_post_challenge(struct
struct rxrpc_skb_priv *sp = rxrpc_skb(skb);
struct rxrpc_call *call = NULL;
struct rxrpc_sock *rx;
- bool respond = false;
+ bool respond = false, queued = false;
sp->chall.conn =
rxrpc_get_connection(conn, rxrpc_conn_get_challenge_input);
@@ -472,8 +472,13 @@ static bool rxrpc_post_challenge(struct
}
if (call)
- rxrpc_notify_socket_oob(call, skb);
+ queued = rxrpc_notify_socket_oob(call, skb);
rcu_read_unlock();
+ if (call && !queued) {
+ rxrpc_put_connection(conn, rxrpc_conn_put_challenge_input);
+ sp->chall.conn = NULL;
+ return false;
+ }
if (!call)
rxrpc_post_packet_to_conn(conn, skb);
--- a/net/rxrpc/oob.c
+++ b/net/rxrpc/oob.c
@@ -32,11 +32,12 @@ struct rxrpc_oob_params {
* Post an out-of-band message for attention by the socket or kernel service
* associated with a reference call.
*/
-void rxrpc_notify_socket_oob(struct rxrpc_call *call, struct sk_buff *skb)
+bool rxrpc_notify_socket_oob(struct rxrpc_call *call, struct sk_buff *skb)
{
struct rxrpc_skb_priv *sp = rxrpc_skb(skb);
struct rxrpc_sock *rx;
struct sock *sk;
+ bool queued = false;
rcu_read_lock();
@@ -49,6 +50,7 @@ void rxrpc_notify_socket_oob(struct rxrp
skb->skb_mstamp_ns = rx->oob_id_counter++;
rxrpc_get_skb(skb, rxrpc_skb_get_post_oob);
skb_queue_tail(&rx->recvmsg_oobq, skb);
+ queued = true;
trace_rxrpc_notify_socket(call->debug_id, sp->hdr.serial);
if (rx->app_ops)
@@ -56,11 +58,12 @@ void rxrpc_notify_socket_oob(struct rxrp
}
spin_unlock_irq(&rx->recvmsg_lock);
- if (!rx->app_ops && !sock_flag(sk, SOCK_DEAD))
+ if (queued && !rx->app_ops && !sock_flag(sk, SOCK_DEAD))
sk->sk_data_ready(sk);
}
rcu_read_unlock();
+ return queued;
}
/*
Patches currently in stable-queue which might be from dhowells at redhat.com are
queue-7.1/rxrpc-don-t-move-a-peeked-oob-message-onto-the-pending-queue.patch
queue-7.1/rxrpc-fix-potential-infinite-loop-in-rxrpc_recvmsg.patch
queue-7.1/rxrpc-rxrpc_verify_data-ensure-rx_dec_buffer-alloc.patch
queue-7.1/afs-fix-further-netns-teardown-to-cancel-the-preallocation-charger.patch
queue-7.1/afs-fix-netns-teardown-to-cancel-the-preallocation-charger.patch
queue-7.1/rxrpc-fix-ackall-packet-handling.patch
queue-7.1/rxrpc-fix-leak-of-connection-from-oob-challenge.patch
queue-7.1/rxrpc-fix-oob-challenge-leak-in-cleanup-after-notification-failure.patch
queue-7.1/afs-handle-cb.initcallbackstate3-requests-without-a-server-record.patch
queue-7.1/rxrpc-fix-socket-notification-race.patch
queue-7.1/rxrpc-fix-rxrpc_rotate_tx_rotate-to-check-there-s-something-to-rotate.patch
queue-7.1/rxrpc-fix-leak-of-released-call-in-recvmsg-msg_peek.patch
queue-7.1/rxrpc-serialize-kernel-accept-preallocation-with-socket-teardown.patch
queue-7.1/afs-fix-null-pointer-dereference-in-afs_get_tree.patch
queue-7.1/rxrpc-fix-the-reception-of-a-reply-packet-before-data-transmission.patch
queue-7.1/rxrpc-fix-double-unlock-in-rxrpc_recvmsg.patch
queue-7.1/afs-fix-uncancelled-rxrpc-oob-message-handler.patch
queue-7.1/rxrpc-fix-uaf-in-rxgk_issue_challenge.patch
More information about the linux-afs
mailing list