From 6e071e54c36b7c7a913c5cc695c192679f7d0d28 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 27 Jun 2014 17:17:29 -0700 Subject: [PATCH] 3.4-stable patches added patches: target-explicitly-clear-ramdisk_mcp-backend-pages.patch --- queue-3.4/series | 1 + ...itly-clear-ramdisk_mcp-backend-pages.patch | 42 +++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 queue-3.4/target-explicitly-clear-ramdisk_mcp-backend-pages.patch diff --git a/queue-3.4/series b/queue-3.4/series index a456d1015f8..22cef92db70 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -28,3 +28,4 @@ usb-sierra-fix-urb-and-memory-leak-on-disconnect.patch usb-sierra-fix-remote-wakeup.patch acpi-fix-conflict-between-customized-dsdt-and-dsdt-local-copy.patch arm-stacktrace-avoid-listing-stacktrace-functions-in-stacktrace.patch +target-explicitly-clear-ramdisk_mcp-backend-pages.patch diff --git a/queue-3.4/target-explicitly-clear-ramdisk_mcp-backend-pages.patch b/queue-3.4/target-explicitly-clear-ramdisk_mcp-backend-pages.patch new file mode 100644 index 00000000000..bbd353f01ff --- /dev/null +++ b/queue-3.4/target-explicitly-clear-ramdisk_mcp-backend-pages.patch @@ -0,0 +1,42 @@ +From nab@linux-iscsi.org Fri Jun 27 17:13:41 2014 +From: "Nicholas A. Bellinger" +Date: Mon, 16 Jun 2014 20:59:52 +0000 +Subject: [PATCH] target: Explicitly clear ramdisk_mcp backend pages +To: target-devel +Cc: Greg-KH , stable , Nicholas Bellinger , Jorge Daniel Sequeira Matias +Message-ID: <1402952392-30762-1-git-send-email-nab@linux-iscsi.org> + + +[Note that a different patch to address the same issue went in during +v3.15-rc1 (commit 4442dc8a), but includes a bunch of other changes that +don't strictly apply to fixing the bug] + +This patch changes rd_allocate_sgl_table() to explicitly clear +ramdisk_mcp backend memory pages by passing __GFP_ZERO into +alloc_pages(). + +This addresses a potential security issue where reading from a +ramdisk_mcp could return sensitive information, and follows what +>= v3.15 does to explicitly clear ramdisk_mcp memory at backend +device initialization time. + +Reported-by: Jorge Daniel Sequeira Matias +Cc: Jorge Daniel Sequeira Matias +Signed-off-by: Nicholas Bellinger +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/target/target_core_rd.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/target/target_core_rd.c ++++ b/drivers/target/target_core_rd.c +@@ -177,7 +177,7 @@ static int rd_build_device_space(struct + - 1; + + for (j = 0; j < sg_per_table; j++) { +- pg = alloc_pages(GFP_KERNEL, 0); ++ pg = alloc_pages(GFP_KERNEL | __GFP_ZERO, 0); + if (!pg) { + pr_err("Unable to allocate scatterlist" + " pages for struct rd_dev_sg_table\n"); -- 2.47.3