android_kernel_xiaomi_sm8350/fs/ecryptfs
Tyler Hicks 2aac0cf886 eCryptfs: NULL crypt_stat dereference during lookup
If ecryptfs_encrypted_view or ecryptfs_xattr_metadata were being
specified as mount options, a NULL pointer dereference of crypt_stat
was possible during lookup.

This patch moves the crypt_stat assignment into
ecryptfs_lookup_and_interpose_lower(), ensuring that crypt_stat
will not be NULL before we attempt to dereference it.

Thanks to Dan Carpenter and his static analysis tool, smatch, for
finding this bug.

Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
Acked-by: Dustin Kirkland <kirkland@canonical.com>
Cc: Dan Carpenter <error27@gmail.com>
Cc: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-03-22 11:20:43 -07:00
..
crypto.c eCryptfs: NULL crypt_stat dereference during lookup 2009-03-22 11:20:43 -07:00
debug.c
dentry.c
ecryptfs_kernel.h eCryptfs: NULL crypt_stat dereference during lookup 2009-03-22 11:20:43 -07:00
file.c eCryptfs: Fix data types (int/size_t) 2009-01-06 15:59:22 -08:00
inode.c eCryptfs: NULL crypt_stat dereference during lookup 2009-03-22 11:20:43 -07:00
Kconfig fs/Kconfig: move ecryptfs out 2009-01-22 13:15:56 +03:00
keystore.c eCryptfs: don't encrypt file key with filename key 2009-03-14 11:57:22 -07:00
kthread.c CRED: Pass credentials through dentry_open() 2008-11-14 10:39:22 +11:00
main.c eCryptfs: don't encrypt file key with filename key 2009-03-14 11:57:22 -07:00
Makefile
messaging.c eCryptfs: Replace %Z with %z 2009-01-06 15:59:22 -08:00
miscdev.c eCryptfs: Replace %Z with %z 2009-01-06 15:59:22 -08:00
mmap.c fs: symlink write_begin allocation context fix 2009-01-04 13:33:20 -08:00
read_write.c
super.c