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]
Date:	Wed, 23 Sep 2009 16:15:34 +0200
From:	Jiri Slaby <jirislaby@...il.com>
To:	James.Bottomley@...e.de
Cc:	linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
	Jiri Slaby <jirislaby@...il.com>,
	Andrew Vasquez <andrew.vasquez@...gic.com>
Subject: [PATCH 4/5] SCSI: qla2xxx, fix NULL-ptr dereference

Stanse found a NULL-ptr dereference on one fail path in
qla25xx_create_rsp_que. It jumps to que_failed label and
qla25xx_free_rsp_que there dereferences rsp which is NULL.

Return with ENOMEM directly instead.

Signed-off-by: Jiri Slaby <jirislaby@...il.com>
Cc: Andrew Vasquez <andrew.vasquez@...gic.com>
Cc: James E.J. Bottomley <James.Bottomley@...e.de>
---
 drivers/scsi/qla2xxx/qla_mid.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_mid.c b/drivers/scsi/qla2xxx/qla_mid.c
index 42b799a..8b4e723 100644
--- a/drivers/scsi/qla2xxx/qla_mid.c
+++ b/drivers/scsi/qla2xxx/qla_mid.c
@@ -659,7 +659,7 @@ qla25xx_create_rsp_que(struct qla_hw_data *ha, uint16_t options,
 	if (rsp == NULL) {
 		qla_printk(KERN_WARNING, ha, "could not allocate memory for"
 				" response que\n");
-		goto que_failed;
+		return -ENOMEM;
 	}
 
 	rsp->length = RESPONSE_ENTRY_CNT_MQ;
-- 
1.6.4.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ