6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: David Howells [ Upstream commit 34f61a07e0cdefaecd3ec03bb5fb22215643678f ] Fix rxkad_verify_response() to free the ticket and the server key under all circumstances by initialising the ticket pointer to NULL and then making all paths through the function after the first allocation has been done go through a single common epilogue that just releases everything - where all the releases skip on a NULL pointer. Fixes: 57af281e5389 ("rxrpc: Tidy up abort generation infrastructure") Fixes: ec832bd06d6f ("rxrpc: Don't retain the server key in the connection") Closes: https://sashiko.dev/#/patchset/20260408121252.2249051-1-dhowells%40redhat.com 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/20260422161438.2593376-2-dhowells@redhat.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- net/rxrpc/rxkad.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/rxrpc/rxkad.c b/net/rxrpc/rxkad.c index 038c4f2e8cef8..262b0df1e447b 100644 --- a/net/rxrpc/rxkad.c +++ b/net/rxrpc/rxkad.c @@ -1311,6 +1311,7 @@ static int rxkad_verify_response(struct rxrpc_connection *conn, kfree(ticket); kfree(response); + key_put(server_key); _leave(" = 0"); return 0; -- 2.53.0