lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240709104910.3397496-1-cuigaosheng1@huawei.com>
Date: Tue, 9 Jul 2024 18:49:10 +0800
From: Gaosheng Cui <cuigaosheng1@...wei.com>
To: <dhowells@...hat.com>, <marc.dionne@...istor.com>, <davem@...emloft.net>,
	<edumazet@...gle.com>, <kuba@...nel.org>, <pabeni@...hat.com>,
	<cuigaosheng1@...wei.com>
CC: <linux-afs@...ts.infradead.org>, <netdev@...r.kernel.org>
Subject: [PATCH -next] rxrpc: Fix the error handling path in rxkad_init_connection_security

If security_level of rxrpc_connection is invalid, ci should be freed
by crypto_free_sync_skcipher, replace error with error_ci to fix the
memory leak.

Fixes: 17926a79320a ("[AF_RXRPC]: Provide secure RxRPC sockets for use by userspace and kernel both")
Signed-off-by: Gaosheng Cui <cuigaosheng1@...wei.com>
---
 net/rxrpc/rxkad.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/rxrpc/rxkad.c b/net/rxrpc/rxkad.c
index 48a1475e6b06..104bb1ec9002 100644
--- a/net/rxrpc/rxkad.c
+++ b/net/rxrpc/rxkad.c
@@ -125,7 +125,7 @@ static int rxkad_init_connection_security(struct rxrpc_connection *conn,
 		break;
 	default:
 		ret = -EKEYREJECTED;
-		goto error;
+		goto error_ci;
 	}
 
 	ret = rxkad_prime_packet_security(conn, ci);
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ