From 086fc947c3aa12292f5ab6b254812d9b88c4be63 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 29 Jul 2013 17:25:11 -0700 Subject: [PATCH] 3.4-stable patches added patches: iscsi-target-fix-tfc_tpg_nacl_auth_cit-configfs-length-overflow.patch usb-storage-add-microvault-flash-drive-to-unusual_devs.patch --- ...cl_auth_cit-configfs-length-overflow.patch | 32 ++++++++++++++++ queue-3.4/series | 2 + ...crovault-flash-drive-to-unusual_devs.patch | 37 +++++++++++++++++++ 3 files changed, 71 insertions(+) create mode 100644 queue-3.4/iscsi-target-fix-tfc_tpg_nacl_auth_cit-configfs-length-overflow.patch create mode 100644 queue-3.4/series create mode 100644 queue-3.4/usb-storage-add-microvault-flash-drive-to-unusual_devs.patch diff --git a/queue-3.4/iscsi-target-fix-tfc_tpg_nacl_auth_cit-configfs-length-overflow.patch b/queue-3.4/iscsi-target-fix-tfc_tpg_nacl_auth_cit-configfs-length-overflow.patch new file mode 100644 index 00000000000..fb046442b0f --- /dev/null +++ b/queue-3.4/iscsi-target-fix-tfc_tpg_nacl_auth_cit-configfs-length-overflow.patch @@ -0,0 +1,32 @@ +From 0fbfc46fb0b2f543a8b539e94c6c293ebc0b05a6 Mon Sep 17 00:00:00 2001 +From: Joern Engel +Date: Wed, 3 Jul 2013 11:35:11 -0400 +Subject: iscsi-target: Fix tfc_tpg_nacl_auth_cit configfs length overflow + +From: Joern Engel + +commit 0fbfc46fb0b2f543a8b539e94c6c293ebc0b05a6 upstream. + +This patch fixes a potential buffer overflow while processing +iscsi_node_auth input for configfs attributes within NodeACL +tfc_tpg_nacl_auth_cit context. + +Signed-off-by: Joern Engel +Signed-off-by: Nicholas Bellinger +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/target/iscsi/iscsi_target_configfs.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/target/iscsi/iscsi_target_configfs.c ++++ b/drivers/target/iscsi/iscsi_target_configfs.c +@@ -415,7 +415,7 @@ static ssize_t __iscsi_##prefix##_store_ + if (!capable(CAP_SYS_ADMIN)) \ + return -EPERM; \ + \ +- snprintf(auth->name, PAGE_SIZE, "%s", page); \ ++ snprintf(auth->name, sizeof(auth->name), "%s", page); \ + if (!strncmp("NULL", auth->name, 4)) \ + auth->naf_flags &= ~flags; \ + else \ diff --git a/queue-3.4/series b/queue-3.4/series new file mode 100644 index 00000000000..2e14cfaa108 --- /dev/null +++ b/queue-3.4/series @@ -0,0 +1,2 @@ +iscsi-target-fix-tfc_tpg_nacl_auth_cit-configfs-length-overflow.patch +usb-storage-add-microvault-flash-drive-to-unusual_devs.patch diff --git a/queue-3.4/usb-storage-add-microvault-flash-drive-to-unusual_devs.patch b/queue-3.4/usb-storage-add-microvault-flash-drive-to-unusual_devs.patch new file mode 100644 index 00000000000..7e6f30655b4 --- /dev/null +++ b/queue-3.4/usb-storage-add-microvault-flash-drive-to-unusual_devs.patch @@ -0,0 +1,37 @@ +From e7a6121f4929c17215f0cdca3726f4bf3e4e9529 Mon Sep 17 00:00:00 2001 +From: Ren Bigcren +Date: Tue, 2 Jul 2013 13:34:30 +0200 +Subject: USB: storage: Add MicroVault Flash Drive to unusual_devs + +From: Ren Bigcren + +commit e7a6121f4929c17215f0cdca3726f4bf3e4e9529 upstream. + +The device report an error capacity when read_capacity_16(). +Using read_capacity_10() can get the correct capacity. + +Signed-off-by: Ren Bigcren +Cc: Matthew Dharm +Signed-off-by: Oskar Andero +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/storage/unusual_devs.h | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/drivers/usb/storage/unusual_devs.h ++++ b/drivers/usb/storage/unusual_devs.h +@@ -657,6 +657,13 @@ UNUSUAL_DEV( 0x054c, 0x016a, 0x0000, 0x + USB_SC_DEVICE, USB_PR_DEVICE, NULL, + US_FL_FIX_INQUIRY ), + ++/* Submitted by Ren Bigcren */ ++UNUSUAL_DEV( 0x054c, 0x02a5, 0x0100, 0x0100, ++ "Sony Corp.", ++ "MicroVault Flash Drive", ++ USB_SC_DEVICE, USB_PR_DEVICE, NULL, ++ US_FL_NO_READ_CAPACITY_16 ), ++ + /* floppy reports multiple luns */ + UNUSUAL_DEV( 0x055d, 0x2020, 0x0000, 0x0210, + "SAMSUNG", -- 2.47.3