rxrpc: fix reference count leak in rxrpc_server_keyring()
Subsystems (3)
PATCH 1/1 rxrpc: fix reference count leak in rxrpc_server_keyring()
In reply to a message not in the archiveFrom: Luxiao Xu <[email protected]>
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")
Reported-by Yifan Wu <[email protected]>
Reported-by Juefei Pu <[email protected]>
Co-developed-by Yuan Tan <[email protected]>
Signed-off-by Yuan Tan <[email protected]>
Suggested-by Xin Liu <[email protected]>
Tested-by Ren Wei <[email protected]>
Signed-off-by Luxiao Xu <[email protected]>
Signed-off-by Ren Wei <[email protected]>
--- net/rxrpc/server_key.c | 3 +++ 1 file changed, 3 insertions(+)
net/rxrpc/server_key.c +3 -0
@@ -125,6 +125,9 @@ int rxrpc_server_keyring(struct rxrpc_sock *rx, sockptr_t optval, int optlen)_enter ("" ); +if (rx->securities) +return -EEXIST ; +if (optlen <=0 || optlen >PAGE_SIZE -1 )return -EINVAL ;
Signature · 1 line
2.43.0