Skip to contentSkip to conversation

FAILED: patch "[PATCH] rxrpc: fix reference count leak in rxrpc_server_keyring()" failed to apply to 5.10-stable tree

PATCH New [email protected] 2 participants 2 messages Apr 13 – Apr 14

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 5.10-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

To reproduce the conflict and resubmit, you may use the following commands:

git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.10.y
git checkout FETCH_HEAD
git cherry-pick -x f125846ee79fcae537a964ce66494e96fa54a6de
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026041355-flap-narrow-9fea@gregkh' --subject-prefix 'PATCH 5.10.y' HEAD^..

Possible dependencies:

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From f125846ee79fcae537a964ce66494e96fa54a6de Mon Sep 17 00:00:00 2001
From: Luxiao Xu <[email protected]>
Date: Wed, 8 Apr 2026 13:12:42 +0100
Subject: [PATCH] rxrpc: fix reference count leak in rxrpc_server_keyring()

This patch fixes a reference count leak in rxrpc_server_keyring() by checking if rx->securities is already set.

net/rxrpc/server_key.c +3 -0
index 36b05fd842a7..27491f1e1273 100644
@@ -125,6 +125,9 @@ int rxrpc_server_keyring(struct rxrpc_sock *rx, sockptr_t optval, int optlen)
 
 	_enter("");
 
+	if (rx->securities)
+		return -EINVAL;
+
 	if (optlen <= 0 || optlen > PAGE_SIZE - 1)
 		return -EINVAL;
 
maintainer
#1 lore raw

PATCH 1/1 rxrpc: fix reference count leak in rxrpc_server_keyring()

From: Luxiao Xu <[email protected]>

[ Upstream commit f125846ee79fcae537a964ce66494e96fa54a6de ]

This patch fixes a reference count leak in rxrpc_server_keyring() by checking if rx->securities is already set.

Fixes 17926a79320a ("[AF_RXRPC]: Provide secure RxRPC sockets for use by userspace and kernel both")
cc Marc Dionne <[email protected]>
cc Simon Horman <[email protected]>
[ applied patch to net/rxrpc/key.c instead of net/rxrpc/server_key.c ]
---
 net/rxrpc/key.c | 3 +++
 1 file changed, 3 insertions(+)
net/rxrpc/key.c +3 -0
index 979338a64c0ca..0144155d02e05 100644
@@ -933,6 +933,9 @@ int rxrpc_server_keyring(struct rxrpc_sock *rx, sockptr_t optval, int optlen)
 
 	_enter("");
 
+	if (rx->securities)
+		return -EINVAL;
+
 	if (optlen <= 0 || optlen > PAGE_SIZE - 1)
 		return -EINVAL;
 
Signature · 1 line
2.53.0