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: <890BF3111FB9484E9526987D912B261932E2D0@NAMAIL3.ad.lsil.com>
Date:	Tue, 25 Jul 2006 08:44:58 -0600
From:	"Ju, Seokmann" <Seokmann.Ju@...l.com>
To:	<James.Bottomley@...elEye.com>, <akpm@...l.org>
Cc:	<linux-scsi@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	"Patro, Sumant" <Sumant.Patro@...enio.com>,
	"Yang, Bo" <Bo.Yang@...enio.com>
Subject: [PATCH 2/3] scsi : megaraid_{mm,mbox}: a fix on INQUIRY with EVPD

Hi,

This is a second patch which should be applied after the previous one
([PATCH 1/3]).

With this patch, driver will protect data corruption created by INQUIRY
with EVPD request
to megaraid controllers.
As specified in the changelog, megaraid F/W already has fixed the issue
and being under 
process of release. Meanwhile, driver will protect the system with this
patch.

Thank you,

Seokmann

Signed-Off By: Seokmann Ju <seokmann.ju@...l.com>
---
diff -Naur 64bitdma/Documentation/scsi/ChangeLog.megaraid
inqwithevpd/Documentation/scsi/ChangeLog.megaraid
--- 64bitdma/Documentation/scsi/ChangeLog.megaraid	2006-07-17
18:01:21.000000000 -0400
+++ inqwithevpd/Documentation/scsi/ChangeLog.megaraid	2006-07-24
15:35:02.000000000 -0400
@@ -59,6 +59,13 @@
 	> Buffer I/O error on device sda6, logical block 522067228
 	> attempt to access beyond end of device
 
+2.	When INQUIRY with EVPD bit set issued to the MegaRAID
controller,
+	system memory gets corrupted.
+	Root Cause: MegaRAID F/W handle the INQUIRY with EVPD bit set
+	incorrectly.
+	Fix: MegaRAID F/W has fixed the problem and being process of
release,
+	soon. Meanwhile, driver will filter out the request.
+
 Release Date	: Mon Apr 11 12:27:22 EST 2006 - Seokmann Ju
<sju@...l.com>
 Current Version : 2.20.4.8 (scsi module), 2.20.2.6 (cmm module)
 Older Version	: 2.20.4.7 (scsi module), 2.20.2.6 (cmm module)
diff -Naur 64bitdma/drivers/scsi/megaraid/mega_common.h
inqwithevpd/drivers/scsi/megaraid/mega_common.h
--- 64bitdma/drivers/scsi/megaraid/mega_common.h	2006-07-24
15:30:45.000000000 -0400
+++ inqwithevpd/drivers/scsi/megaraid/mega_common.h	2006-07-24
15:35:46.000000000 -0400
@@ -40,6 +40,9 @@
 #define HBA_SIGNATURE_64_BIT		0x299
 #define PCI_CONF_AMISIG64		0xa4
 
+#define MEGA_SCSI_INQ_EVPD		1
+#define MEGA_INVALID_FIELD_IN_CDB	0x24
+
 
 /**
  * scb_t - scsi command control block
diff -Naur 64bitdma/drivers/scsi/megaraid/megaraid_mbox.c
inqwithevpd/drivers/scsi/megaraid/megaraid_mbox.c
--- 64bitdma/drivers/scsi/megaraid/megaraid_mbox.c	2006-07-25
09:50:26.000000000 -0400
+++ inqwithevpd/drivers/scsi/megaraid/megaraid_mbox.c	2006-07-25
09:47:55.000000000 -0400
@@ -1644,6 +1644,14 @@
 				rdev->last_disp |= (1L <<
SCP2CHANNEL(scp));
 			}
 
+			if (scp->cmnd[1] & MEGA_SCSI_INQ_EVPD) {
+				scp->sense_buffer[0] = 0x70;
+				scp->sense_buffer[2] = ILLEGAL_REQUEST;
+				scp->sense_buffer[12] =
MEGA_INVALID_FIELD_IN_CDB;
+				scp->result = CHECK_CONDITION << 1;
+				return NULL;
+			}
+
 			/* Fall through */
 
 		case READ_CAPACITY:
---

Download attachment "megaraid_inqwithevpd.patch" of type "application/octet-stream" (2069 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ