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>] [day] [month] [year] [list]
Message-ID: <82634D25223A75A0+20251012161749.2994033-3-chenxiaosong@chenxiaosong.com>
Date: Mon, 13 Oct 2025 00:17:29 +0800
From: chenxiaosong@...nxiaosong.com
To: stfrench@...rosoft.com,
	metze@...ba.org,
	pali@...nel.org,
	linkinjeon@...nel.org,
	smfrench@...il.com,
	sfrench@...ba.org,
	senozhatsky@...omium.org,
	tom@...pey.com,
	pc@...guebit.org,
	ronniesahlberg@...il.com,
	sprasad@...rosoft.com,
	bharathsm@...rosoft.com,
	zhangguodong@...inos.cn
Cc: linux-cifs@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	ChenXiaoSong <chenxiaosong@...inos.cn>
Subject: [PATCH v2 02/22] smb/server: fix possible refcount leak in smb2_sess_setup()

From: ZhangGuoDong <zhangguodong@...inos.cn>

Reference count of ksmbd_session will leak when session need reconnect.
Fix this by adding the missing ksmbd_user_session_put().

Co-developed-by: ChenXiaoSong <chenxiaosong@...inos.cn>
Signed-off-by: ChenXiaoSong <chenxiaosong@...inos.cn>
Signed-off-by: ZhangGuoDong <zhangguodong@...inos.cn>
---
 fs/smb/server/smb2pdu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/smb/server/smb2pdu.c b/fs/smb/server/smb2pdu.c
index e81e615f322a..b731d9b09408 100644
--- a/fs/smb/server/smb2pdu.c
+++ b/fs/smb/server/smb2pdu.c
@@ -1806,6 +1806,7 @@ int smb2_sess_setup(struct ksmbd_work *work)
 
 		if (ksmbd_conn_need_reconnect(conn)) {
 			rc = -EFAULT;
+			ksmbd_user_session_put(sess);
 			sess = NULL;
 			goto out_err;
 		}
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ