android_kernel_xiaomi_sm8350/fs/ecryptfs
Tyler Hicks 3a6b42cadc eCryptfs: Larger buffer for encrypted symlink targets
When using filename encryption with eCryptfs, the value of the symlink
in the lower filesystem is encrypted and stored as a Tag 70 packet.
This results in a longer symlink target than if the target value wasn't
encrypted.

Users were reporting these messages in their syslog:

[ 45.653441] ecryptfs_parse_tag_70_packet: max_packet_size is [56]; real
packet size is [51]
[ 45.653444] ecryptfs_decode_and_decrypt_filename: Could not parse tag
70 packet from filename; copying through filename as-is

This was due to bufsiz, one the arguments in readlink(), being used to
when allocating the buffer passed to the lower inode's readlink().
That symlink target may be very large, but when decoded and decrypted,
could end up being smaller than bufsize.

To fix this, the buffer passed to the lower inode's readlink() will
always be PATH_MAX in size when filename encryption is enabled.  Any
necessary truncation occurs after the decoding and decrypting.

Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
2009-04-22 17:02:46 -05:00
..
crypto.c eCryptfs: Fix data corruption when using ecryptfs_passthrough 2009-04-22 03:54:13 -05:00
debug.c
dentry.c constify dentry_operations: ecryptfs 2009-03-27 14:44:01 -04:00
ecryptfs_kernel.h eCryptfs: Remove ecryptfs_unlink_sigs warnings 2009-04-22 04:08:46 -05:00
file.c eCryptfs: Fix data types (int/size_t) 2009-01-06 15:59:22 -08:00
inode.c eCryptfs: Larger buffer for encrypted symlink targets 2009-04-22 17:02:46 -05:00
Kconfig fs/Kconfig: move ecryptfs out 2009-01-22 13:15:56 +03:00
keystore.c ecryptfs: use kzfree() 2009-04-01 08:59:23 -07:00
kthread.c CRED: Pass credentials through dentry_open() 2008-11-14 10:39:22 +11:00
main.c eCryptfs: Remove ecryptfs_unlink_sigs warnings 2009-04-22 04:08:46 -05:00
Makefile eCryptfs: remove netlink transport 2008-10-16 11:21:39 -07:00
messaging.c eCryptfs: NULL pointer dereference in ecryptfs_send_miscdev() 2009-04-22 03:54:13 -05:00
miscdev.c eCryptfs: NULL pointer dereference in ecryptfs_send_miscdev() 2009-04-22 03:54:13 -05:00
mmap.c eCryptfs: Fix data corruption when using ecryptfs_passthrough 2009-04-22 03:54:13 -05:00
read_write.c eCryptfs: Fix data corruption when using ecryptfs_passthrough 2009-04-22 03:54:13 -05:00
super.c eCryptfs: Remove ecryptfs_unlink_sigs warnings 2009-04-22 04:08:46 -05:00