diff options
author | Michael Halcrow <mhalcrow@google.com> | 2014-11-26 09:09:16 -0800 |
---|---|---|
committer | Andreas Blaesius <skate4life@gmx.de> | 2016-10-12 23:23:53 +0200 |
commit | 8ef7d05d00c522ebc1ac52e36b3855f24584160d (patch) | |
tree | ed8cdea878fcd6e6ac3d2d59f91c23e0f211bfc5 /fs | |
parent | 6d219535a3a7b1869a44d9ed93875b57a8053010 (diff) | |
download | kernel_samsung_espresso10-8ef7d05d00c522ebc1ac52e36b3855f24584160d.zip kernel_samsung_espresso10-8ef7d05d00c522ebc1ac52e36b3855f24584160d.tar.gz kernel_samsung_espresso10-8ef7d05d00c522ebc1ac52e36b3855f24584160d.tar.bz2 |
eCryptfs: Remove buggy and unnecessary write in file name decode routine
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.
Change-Id: Id8e04a580e550495c46cd36fec430a1ec4342940
Signed-off-by: Michael Halcrow <mhalcrow@google.com>
Reported-by: Dmitry Chernenkov <dmitryc@google.com>
Suggested-by: Kees Cook <keescook@chromium.org>
Cc: stable@vger.kernel.org # v2.6.29+: 51ca58d eCryptfs: Filename Encryption: Encoding and encryption functions
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ecryptfs/crypto.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c index c6602d2..dcf1fb5 100644 --- a/fs/ecryptfs/crypto.c +++ b/fs/ecryptfs/crypto.c @@ -2036,7 +2036,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; } |