summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/files/eCryptfs-CVE-2014-9683.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/files/eCryptfs-CVE-2014-9683.patch')
-rw-r--r--recipes-kernel/linux/files/eCryptfs-CVE-2014-9683.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/recipes-kernel/linux/files/eCryptfs-CVE-2014-9683.patch b/recipes-kernel/linux/files/eCryptfs-CVE-2014-9683.patch
new file mode 100644
index 0000000..0cd9c95
--- /dev/null
+++ b/recipes-kernel/linux/files/eCryptfs-CVE-2014-9683.patch
@@ -0,0 +1,41 @@
1From 8ffea99d6f2be99790611282f326da95a84a8cab Mon Sep 17 00:00:00 2001
2From: Michael Halcrow <mhalcrow@google.com>
3Date: Wed, 26 Nov 2014 09:09:16 -0800
4Subject: [PATCH] eCryptfs: Remove buggy and unnecessary write in file name
5 decode routine
6
7commit 942080643bce061c3dd9d5718d3b745dcb39a8bc upstream.
8
9Dmitry Chernenkov used KASAN to discover that eCryptfs writes past the
10end of the allocated buffer during encrypted filename decoding. This
11fix corrects the issue by getting rid of the unnecessary 0 write when
12the current bit offset is 2.
13
14Fixes CVE-2014-9683
15Upstream-Status: Backport
16
17Signed-off-by: Michael Halcrow <mhalcrow@google.com>
18Reported-by: Dmitry Chernenkov <dmitryc@google.com>
19Suggested-by: Kees Cook <keescook@chromium.org>
20Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
21Signed-off-by: Jiri Slaby <jslaby@suse.cz>
22Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
23---
24 fs/ecryptfs/crypto.c | 1 -
25 1 file changed, 1 deletion(-)
26
27diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c
28index 000eae2..bf926f7 100644
29--- a/fs/ecryptfs/crypto.c
30+++ b/fs/ecryptfs/crypto.c
31@@ -1917,7 +1917,6 @@ ecryptfs_decode_from_filename(unsigned char *dst, size_t *dst_size,
32 break;
33 case 2:
34 dst[dst_byte_offset++] |= (src_byte);
35- dst[dst_byte_offset] = 0;
36 current_bit_offset = 0;
37 break;
38 }
39--
401.9.1
41