From: Greg Kroah-Hartman Date: Fri, 24 Apr 2026 08:35:04 +0000 (+0200) Subject: 6.12-stable patches X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=bf4044e141c830a24f8346a6e3945d3c7c3296d6;p=thirdparty%2Fkernel%2Fstable-queue.git 6.12-stable patches added patches: rxrpc-only-handle-response-during-service-challenge.patch --- diff --git a/queue-6.12/rxrpc-only-handle-response-during-service-challenge.patch b/queue-6.12/rxrpc-only-handle-response-during-service-challenge.patch new file mode 100644 index 0000000000..86d7788e09 --- /dev/null +++ b/queue-6.12/rxrpc-only-handle-response-during-service-challenge.patch @@ -0,0 +1,83 @@ +From stable+bounces-237804-greg=kroah.com@vger.kernel.org Tue Apr 14 13:21:18 2026 +From: Sasha Levin +Date: Tue, 14 Apr 2026 07:21:03 -0400 +Subject: rxrpc: only handle RESPONSE during service challenge +To: stable@vger.kernel.org +Cc: Wang Jie , Yifan Wu , Juefei Pu , Yuan Tan , Xin Liu , Yang Yang , David Howells , Marc Dionne , Jeffrey Altman , Simon Horman , linux-afs@lists.infradead.org, stable@kernel.org, Jakub Kicinski , Sasha Levin +Message-ID: <20260414112103.379483-2-sashal@kernel.org> + +From: Wang Jie + +[ Upstream commit c43ffdcfdbb5567b1f143556df8a04b4eeea041c ] + +Only process RESPONSE packets while the service connection is still in +RXRPC_CONN_SERVICE_CHALLENGING. Check that state under state_lock before +running response verification and security initialization, then use a local +secured flag to decide whether to queue the secured-connection work after +the state transition. This keeps duplicate or late RESPONSE packets from +re-running the setup path and removes the unlocked post-transition state +test. + +Fixes: 17926a79320a ("[AF_RXRPC]: Provide secure RxRPC sockets for use by userspace and kernel both") +Reported-by: Yifan Wu +Reported-by: Juefei Pu +Co-developed-by: Yuan Tan +Signed-off-by: Yuan Tan +Suggested-by: Xin Liu +Signed-off-by: Jie Wang +Signed-off-by: Yang Yang +Signed-off-by: David Howells +cc: Marc Dionne +cc: Jeffrey Altman +cc: Simon Horman +cc: linux-afs@lists.infradead.org +cc: stable@kernel.org +Link: https://patch.msgid.link/20260408121252.2249051-21-dhowells@redhat.com +Signed-off-by: Jakub Kicinski +[ adapted spin_lock_irq/spin_unlock_irq calls to spin_lock/spin_unlock ] +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + net/rxrpc/conn_event.c | 14 ++++++++++++-- + 1 file changed, 12 insertions(+), 2 deletions(-) + +--- a/net/rxrpc/conn_event.c ++++ b/net/rxrpc/conn_event.c +@@ -233,6 +233,7 @@ static int rxrpc_process_event(struct rx + struct sk_buff *skb) + { + struct rxrpc_skb_priv *sp = rxrpc_skb(skb); ++ bool secured = false; + int ret; + + if (conn->state == RXRPC_CONN_ABORTED) +@@ -245,6 +246,13 @@ static int rxrpc_process_event(struct rx + return conn->security->respond_to_challenge(conn, skb); + + case RXRPC_PACKET_TYPE_RESPONSE: ++ spin_lock(&conn->state_lock); ++ if (conn->state != RXRPC_CONN_SERVICE_CHALLENGING) { ++ spin_unlock(&conn->state_lock); ++ return 0; ++ } ++ spin_unlock(&conn->state_lock); ++ + ret = conn->security->verify_response(conn, skb); + if (ret < 0) + return ret; +@@ -255,11 +263,13 @@ static int rxrpc_process_event(struct rx + return ret; + + spin_lock(&conn->state_lock); +- if (conn->state == RXRPC_CONN_SERVICE_CHALLENGING) ++ if (conn->state == RXRPC_CONN_SERVICE_CHALLENGING) { + conn->state = RXRPC_CONN_SERVICE; ++ secured = true; ++ } + spin_unlock(&conn->state_lock); + +- if (conn->state == RXRPC_CONN_SERVICE) { ++ if (secured) { + /* Offload call state flipping to the I/O thread. As + * we've already received the packet, put it on the + * front of the queue. diff --git a/queue-6.12/series b/queue-6.12/series index 1cc5af2c85..2f3b586e3b 100644 --- a/queue-6.12/series +++ b/queue-6.12/series @@ -10,3 +10,4 @@ scripts-generate_rust_analyzer.py-define-scripts.patch mm-pagewalk-fix-race-between-concurrent-split-and-refault.patch ksmbd-fix-use-after-free-in-__ksmbd_close_fd-via-durable-scavenger.patch scripts-dtc-remove-unused-dts_version-in-dtc-lexer.l.patch +rxrpc-only-handle-response-during-service-challenge.patch