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-next>] [day] [month] [year] [list]
Message-ID: <4EBBF646.8010705@oracle.com>
Date:	Thu, 10 Nov 2011 08:05:26 -0800
From:	Yinghai Lu <yinghai.lu@...cle.com>
To:	"James E.J. Bottomley" <JBottomley@...allels.com>,
	Nagalakshmi Nandigama <nagalakshmi.nandigama@....com>
CC:	Kashyap Desai <kashyap.desai@....com>,
	Eric Moore <eric.moore@....com>, linux-scsi@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH] mpt2sas: Fix null reference in recovery_delete_devices


Got panic:
[  752.590700] BUG: unable to handle kernel NULL pointer dereference at 00000000000000f6
[  752.598542] IP: [<ffffffff8160b5f3>] mpt2sas_scsih_reset_handler+0x168/0x183
[  752.605595] PGD 175d43067 PUD 175d44067 PMD 0 
[  752.610081] Oops: 0002 [#1] SMP 
[  752.613342] CPU 0 
[  752.615175] Modules linked in:
[  752.618428] 
[  752.619921] Pid: 9187, comm: sas2flash Not tainted 3.2.0-rc1-tip-yh-01580-g878f195-dirty #1288 Oracle Corporation Sun Blade
[  752.632632] RIP: 0010:[<ffffffff8160b5f3>]  [<ffffffff8160b5f3>] mpt2sas_scsih_reset_handler+0x168/0x183

it turns out it is introduced in

_scsih_error_recovery_delete_devices() forget to alloc the event before using.

It is introduced by:

| commit 921cd8024b908f8f49f772c8d3a02381b4db2ed2
| Author: nagalakshmi.nandigama@....com <nagalakshmi.nandigama@....com>
| Date:   Wed Oct 19 15:36:26 2011 +0530
|
|    [SCSI] mpt2sas: New feature - Fast Load Support

Signed-off-by: Yinghai Lu <yinghai@...nel.org>

---
 drivers/scsi/mpt2sas/mpt2sas_scsih.c |    3 +++
 1 file changed, 3 insertions(+)

Index: linux-2.6/drivers/scsi/mpt2sas/mpt2sas_scsih.c
===================================================================
--- linux-2.6.orig/drivers/scsi/mpt2sas/mpt2sas_scsih.c
+++ linux-2.6/drivers/scsi/mpt2sas/mpt2sas_scsih.c
@@ -2802,6 +2802,9 @@ _scsih_error_recovery_delete_devices(str
 
 	if (ioc->is_driver_loading)
 		return;
+	fw_event = kzalloc(sizeof(struct fw_event_work), GFP_ATOMIC);
+	if (!fw_event)
+		return;
 	fw_event->event = MPT2SAS_REMOVE_UNRESPONDING_DEVICES;
 	fw_event->ioc = ioc;
 	_scsih_fw_event_add(ioc, fw_event);
--
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