summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/files/target-CVE-2014-4027.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/files/target-CVE-2014-4027.patch')
-rw-r--r--recipes-kernel/linux/files/target-CVE-2014-4027.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/recipes-kernel/linux/files/target-CVE-2014-4027.patch b/recipes-kernel/linux/files/target-CVE-2014-4027.patch
new file mode 100644
index 0000000..0f8b49c
--- /dev/null
+++ b/recipes-kernel/linux/files/target-CVE-2014-4027.patch
@@ -0,0 +1,46 @@
1From 186f32e2096c7d9cd9106b8dedd79c596f4c8398 Mon Sep 17 00:00:00 2001
2From: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
3Date: Mon, 16 Jun 2014 20:59:52 +0000
4Subject: [PATCH] target: Explicitly clear ramdisk_mcp backend pages
5
6[Note that a different patch to address the same issue went in during
7v3.15-rc1 (commit 4442dc8a), but includes a bunch of other changes that
8don't strictly apply to fixing the bug]
9
10This patch changes rd_allocate_sgl_table() to explicitly clear
11ramdisk_mcp backend memory pages by passing __GFP_ZERO into
12alloc_pages().
13
14This addresses a potential security issue where reading from a
15ramdisk_mcp could return sensitive information, and follows what
16>= v3.15 does to explicitly clear ramdisk_mcp memory at backend
17device initialization time.
18
19This fixes CVE-2014-4027
20Upstream-Status: Backport
21
22Reported-by: Jorge Daniel Sequeira Matias <jdsm@tecnico.ulisboa.pt>
23Cc: Jorge Daniel Sequeira Matias <jdsm@tecnico.ulisboa.pt>
24Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
25Signed-off-by: Jiri Slaby <jslaby@suse.cz>
26Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
27---
28 drivers/target/target_core_rd.c | 2 +-
29 1 file changed, 1 insertion(+), 1 deletion(-)
30
31diff --git a/drivers/target/target_core_rd.c b/drivers/target/target_core_rd.c
32index 131327a..9f6bede 100644
33--- a/drivers/target/target_core_rd.c
34+++ b/drivers/target/target_core_rd.c
35@@ -179,7 +179,7 @@ static int rd_build_device_space(struct rd_dev *rd_dev)
36 - 1;
37
38 for (j = 0; j < sg_per_table; j++) {
39- pg = alloc_pages(GFP_KERNEL, 0);
40+ pg = alloc_pages(GFP_KERNEL | __GFP_ZERO, 0);
41 if (!pg) {
42 pr_err("Unable to allocate scatterlist"
43 " pages for struct rd_dev_sg_table\n");
44--
451.9.1
46