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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240623131154.36458-2-yskelg@gmail.com>
Date: Sun, 23 Jun 2024 22:11:55 +0900
From: yskelg@...il.com
To: Alexandra Winter <wintera@...ux.ibm.com>,
	Thorsten Winkler <twinkler@...ux.ibm.com>,
	Heiko Carstens <hca@...ux.ibm.com>,
	Vasily Gorbik <gor@...ux.ibm.com>,
	Alexander Gordeev <agordeev@...ux.ibm.com>,
	Christian Borntraeger <borntraeger@...ux.ibm.com>,
	Sven Schnelle <svens@...ux.ibm.com>
Cc: shjy180909@...il.com,
	linux-s390@...r.kernel.org,
	netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Yunseong Kim <yskelg@...il.com>
Subject: [PATCH] s390/netiucv: handle memory allocation failure in conn_action_start()

From: Yunseong Kim <yskelg@...il.com>

This patch handle potential null pointer dereference in
iucv_path_connect(), When iucv_path_alloc() fails to allocate memory
for 'rc'.

Signed-off-by: Yunseong Kim <yskelg@...il.com>
---
 drivers/s390/net/netiucv.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c
index 039e18d46f76..c2df0c312d81 100644
--- a/drivers/s390/net/netiucv.c
+++ b/drivers/s390/net/netiucv.c
@@ -855,6 +855,10 @@ static void conn_action_start(fsm_instance *fi, int event, void *arg)
 
 	fsm_newstate(fi, CONN_STATE_SETUPWAIT);
 	conn->path = iucv_path_alloc(NETIUCV_QUEUELEN_DEFAULT, 0, GFP_KERNEL);
+	if (!conn->path) {
+		IUCV_DBF_TEXT_(setup, 2, "iucv_path_alloc: memory allocation failed.\n");
+		return;
+	}
 	IUCV_DBF_TEXT_(setup, 2, "%s: connecting to %s ...\n",
 		netdev->name, netiucv_printuser(conn));
 
-- 
2.45.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ