[3.16.y-ckt stable] Patch "eCryptfs: Remove buggy and unnecessary write in file name decode routine" has been added to staging queue

Luis Henriques luis.henriques at canonical.com
Wed Jan 7 10:31:38 UTC 2015


This is a note to let you know that I have just added a patch titled

    eCryptfs: Remove buggy and unnecessary write in file name decode routine

to the linux-3.16.y-queue branch of the 3.16.y-ckt extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.16.y-queue

This patch is scheduled to be released in version 3.16.7-ckt4.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.16.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Luis

------

>From c81f341aadcef31eab3c1490c7cbdcc8cb3472be Mon Sep 17 00:00:00 2001
From: Michael Halcrow <mhalcrow at google.com>
Date: Wed, 26 Nov 2014 09:09:16 -0800
Subject: eCryptfs: Remove buggy and unnecessary write in file name decode
 routine

commit 942080643bce061c3dd9d5718d3b745dcb39a8bc upstream.

Dmitry Chernenkov used KASAN to discover that eCryptfs writes past the
end of the allocated buffer during encrypted filename decoding. This
fix corrects the issue by getting rid of the unnecessary 0 write when
the current bit offset is 2.

Signed-off-by: Michael Halcrow <mhalcrow at google.com>
Reported-by: Dmitry Chernenkov <dmitryc at google.com>
Suggested-by: Kees Cook <keescook at chromium.org>
Signed-off-by: Tyler Hicks <tyhicks at canonical.com>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
 fs/ecryptfs/crypto.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c
index 2f6735dbf1a9..31b148f3e772 100644
--- a/fs/ecryptfs/crypto.c
+++ b/fs/ecryptfs/crypto.c
@@ -1917,7 +1917,6 @@ ecryptfs_decode_from_filename(unsigned char *dst, size_t *dst_size,
 			break;
 		case 2:
 			dst[dst_byte_offset++] |= (src_byte);
-			dst[dst_byte_offset] = 0;
 			current_bit_offset = 0;
 			break;
 		}
--
2.1.4





More information about the kernel-team mailing list