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: <20071022041057.GA11676@minyard.local>
Date:	Sun, 21 Oct 2007 23:10:57 -0500
From:	Corey Minyard <minyard@....org>
To:	Andrew Morton <akpm@...l.org>,
	Linux Kernel <linux-kernel@...r.kernel.org>
Cc:	Adrian Bunk <bunk@...nel.org>, Stian Jordet <liste@...det.net>
Subject: [PATCH] IPMI: fix comparison in demangle_device_id

From: Corey Minyard <cminyard@...sta.com>

Coverity spotted some incorrect code in a recent change to the IPMI
driver; this patch make sure the data is really long enough to pull
the manufacturer id and product id out of a get device id message.

Signed-off-by: Corey Minyard <cminyard@...sta.com>
Cc: Adrian Bunk <bunk@...nel.org>
Cc: Stian Jordet <liste@...det.net>
---
Index: linux-2.6.23/include/linux/ipmi_smi.h
===================================================================
--- linux-2.6.23.orig/include/linux/ipmi_smi.h
+++ linux-2.6.23/include/linux/ipmi_smi.h
@@ -173,7 +173,7 @@ static inline int ipmi_demangle_device_i
 	id->firmware_revision_2 = data[3];
 	id->ipmi_version = data[4];
 	id->additional_device_support = data[5];
-	if (data_len >= 6) {
+	if (data_len >= 11) {
 		id->manufacturer_id = (data[6] | (data[7] << 8) |
 				       (data[8] << 16));
 		id->product_id = data[9] | (data[10] << 8);
-
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