linux/fs/ecryptfs
Tyler Hicks 0f751e641a eCryptfs: Extend array bounds for all filename chars
From mhalcrow's original commit message:

    Characters with ASCII values greater than the size of
    filename_rev_map[] are valid filename characters.
    ecryptfs_decode_from_filename() will access kernel memory beyond
    that array, and ecryptfs_parse_tag_70_packet() will then decrypt
    those characters. The attacker, using the FNEK of the crafted file,
    can then re-encrypt the characters to reveal the kernel memory past
    the end of the filename_rev_map[] array. I expect low security
    impact since this array is statically allocated in the text area,
    and the amount of memory past the array that is accessible is
    limited by the largest possible ASCII filename character.

This patch solves the issue reported by mhalcrow but with an
implementation suggested by Linus to simply extend the length of
filename_rev_map[] to 256. Characters greater than 0x7A are mapped to
0x00, which is how invalid characters less than 0x7A were previously
being handled.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Reported-by: Michael Halcrow <mhalcrow@google.com>
Cc: stable@kernel.org
2011-11-23 15:43:53 -06:00
..
crypto.c eCryptfs: Extend array bounds for all filename chars 2011-11-23 15:43:53 -06:00
debug.c
dentry.c
ecryptfs_kernel.h eCryptfs: Prevent file create race condition 2011-11-23 15:39:38 -06:00
file.c eCryptfs: Flush file in vma close 2011-11-23 15:40:09 -06:00
inode.c eCryptfs: Prevent file create race condition 2011-11-23 15:39:38 -06:00
Kconfig
keystore.c
kthread.c
main.c
Makefile
messaging.c
miscdev.c
mmap.c
read_write.c
super.c