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>] [day] [month] [year] [list]
Message-Id: <200811171137.17431.david-b@pacbell.net>
Date:	Mon, 17 Nov 2008 11:37:17 -0800
From:	David Brownell <david-b@...bell.net>
To:	Linux MTD <linux-mtd@...ts.infradead.org>
Cc:	lkml <linux-kernel@...r.kernel.org>,
	Chen Gong <g.chen@...escale.com>
Subject: [patch 2.6.28-rc5] mtd m25p80: regression fix for chip detection

From: David Brownell <dbrownell@...rs.sourceforge.net>

The "m25p80.c extended jedec support" patch introduced a regression
whereby every chip ended up matching the first entry in the list
of chips, since it parenthesized a test incorrectly.

This bug could cause MTD filesystem corruption, and all sorts crazy
stuff since all chips would appear to be small (128KB) Atmel chips
instead of what they really were.

Signed-off-by: David Brownell <dbrownell@...rs.sourceforge.net>
Cc: Chen Gong <g.chen@...escale.com>
---
 drivers/mtd/devices/m25p80.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -574,10 +574,11 @@ static struct flash_info *__devinit jede
 	for (tmp = 0, info = m25p_data;
 			tmp < ARRAY_SIZE(m25p_data);
 			tmp++, info++) {
-		if (info->jedec_id == jedec)
+		if (info->jedec_id == jedec) {
 			if (ext_jedec != 0 && info->ext_id != ext_jedec)
 				continue;
 			return info;
+		}
 	}
 	dev_err(&spi->dev, "unrecognized JEDEC id %06x\n", jedec);
 	return NULL;
--
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