Patch "target/pscsi: Fix NULL pointer dereference in get_device_type" has been added to the 3.14-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    target/pscsi: Fix NULL pointer dereference in get_device_type

to the 3.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     target-pscsi-fix-null-pointer-dereference-in-get_device_type.patch
and it can be found in the queue-3.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 215a8fe4198f607f34ecdbc9969dae783d8b5a61 Mon Sep 17 00:00:00 2001
From: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx>
Date: Fri, 27 Feb 2015 03:54:13 -0800
Subject: target/pscsi: Fix NULL pointer dereference in get_device_type

From: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx>

commit 215a8fe4198f607f34ecdbc9969dae783d8b5a61 upstream.

This patch fixes a NULL pointer dereference OOPs with pSCSI backends
within target_core_stat.c code.  The bug is caused by a configfs attr
read if no pscsi_dev_virt->pdv_sd has been configured.

Reported-by: Olaf Hering <olaf@xxxxxxxxx>
Signed-off-by: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
 drivers/target/target_core_pscsi.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/target/target_core_pscsi.c
+++ b/drivers/target/target_core_pscsi.c
@@ -1111,7 +1111,7 @@ static u32 pscsi_get_device_type(struct
 	struct pscsi_dev_virt *pdv = PSCSI_DEV(dev);
 	struct scsi_device *sd = pdv->pdv_sd;
 
-	return sd->type;
+	return (sd) ? sd->type : TYPE_NO_LUN;
 }
 
 static sector_t pscsi_get_blocks(struct se_device *dev)


Patches currently in stable-queue which might be from nab@xxxxxxxxxxxxxxx are

queue-3.14/iscsi-target-avoid-early-conn_logout_comp-for-iser-connections.patch
queue-3.14/target-pscsi-fix-null-pointer-dereference-in-get_device_type.patch
queue-3.14/target-fix-virtual-lun-0-target_configure_device-failure-oops.patch
queue-3.14/target-allow-write-exclusive-non-reservation-holders-to-read.patch
queue-3.14/target-avoid-dropping-allregistrants-reservation-during-unregister.patch
queue-3.14/target-fix-reference-leak-in-target_get_sess_cmd-error-path.patch
queue-3.14/target-allow-allregistrants-to-re-reserve-existing-reservation.patch
queue-3.14/target-fix-r_holder-bit-usage-for-allregistrants.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]