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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240318194902.3290795-2-khazhy@google.com>
Date: Mon, 18 Mar 2024 12:49:02 -0700
From: Khazhismel Kumykov <khazhy@...omium.org>
To: Lee Duncan <lduncan@...e.com>,
	Chris Leech <cleech@...hat.com>,
	Mike Christie <michael.christie@...cle.com>,
	"James E . J . Bottomley" <jejb@...ux.ibm.com>,
	"Martin K . Petersen" <martin.petersen@...cle.com>
Cc: open-iscsi@...glegroups.com,
	linux-scsi@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Khazhismel Kumykov <khazhy@...gle.com>
Subject: [PATCH 2/2] iscsi_tcp: disallow binding the same connection twice

iscsi_sw_tcp_conn_bind does not check or cleanup previously bound
sockets, nor should we allow binding the same connection twice.

Signed-off-by: Khazhismel Kumykov <khazhy@...gle.com>
---
 drivers/scsi/iscsi_tcp.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c
index e8ed60b777c6..8cf5dc203a82 100644
--- a/drivers/scsi/iscsi_tcp.c
+++ b/drivers/scsi/iscsi_tcp.c
@@ -716,6 +716,9 @@ iscsi_sw_tcp_conn_bind(struct iscsi_cls_session *cls_session,
 	struct socket *sock;
 	int err;
 
+	if (tcp_sw_conn->sock)
+		return -EINVAL;
+
 	/* lookup for existing socket */
 	sock = sockfd_lookup((int)transport_eph, &err);
 	if (!sock) {
-- 
2.44.0.291.gc1ea87d7ee-goog


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ