Patch "rxrpc: Fix key reference count leak from call->key" has been added to the 6.19-stable tree
gregkh at linuxfoundation.org
gregkh at linuxfoundation.org
Mon Apr 13 05:39:01 PDT 2026
This is a note to let you know that I've just added the patch titled
rxrpc: Fix key reference count leak from call->key
to the 6.19-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-key-reference-count-leak-from-call-key.patch
and it can be found in the queue-6.19 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 d666540d217e8d420544ebdfbadeedd623562733 Mon Sep 17 00:00:00 2001
From: Anderson Nascimento <anderson at allelesecurity.com>
Date: Wed, 8 Apr 2026 13:12:36 +0100
Subject: rxrpc: Fix key reference count leak from call->key
From: Anderson Nascimento <anderson at allelesecurity.com>
commit d666540d217e8d420544ebdfbadeedd623562733 upstream.
When creating a client call in rxrpc_alloc_client_call(), the code obtains
a reference to the key. This is never cleaned up and gets leaked when the
call is destroyed.
Fix this by freeing call->key in rxrpc_destroy_call().
Before the patch, it shows the key reference counter elevated:
$ cat /proc/keys | grep afs at 54321
1bffe9cd I--Q--i 8053480 4169w 3b010000 1000 1000 rxrpc afs at 54321: ka
$
After the patch, the invalidated key is removed when the code exits:
$ cat /proc/keys | grep afs at 54321
$
Fixes: f3441d4125fc ("rxrpc: Copy client call parameters into rxrpc_call earlier")
Signed-off-by: Anderson Nascimento <anderson at allelesecurity.com>
Co-developed-by: David Howells <dhowells at redhat.com>
Signed-off-by: David Howells <dhowells at redhat.com>
Reviewed-by: Jeffrey Altman <jaltman at auristor.com>
cc: Marc Dionne <marc.dionne 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/20260408121252.2249051-9-dhowells@redhat.com
Signed-off-by: Jakub Kicinski <kuba at kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
---
net/rxrpc/call_object.c | 1 +
1 file changed, 1 insertion(+)
--- a/net/rxrpc/call_object.c
+++ b/net/rxrpc/call_object.c
@@ -692,6 +692,7 @@ static void rxrpc_destroy_call(struct wo
rxrpc_put_bundle(call->bundle, rxrpc_bundle_put_call);
rxrpc_put_peer(call->peer, rxrpc_peer_put_call);
rxrpc_put_local(call->local, rxrpc_local_put_call);
+ key_put(call->key);
call_rcu(&call->rcu, rxrpc_rcu_free_call);
}
Patches currently in stable-queue which might be from anderson at allelesecurity.com are
queue-6.19/rxrpc-proc-size-address-buffers-for-pispc-output.patch
queue-6.19/rxrpc-fix-key-reference-count-leak-from-call-key.patch
queue-6.19/rxrpc-fix-key-keyring-checks-in-setsockopt-rxrpc_security_key-keyring.patch
More information about the linux-afs
mailing list