kernel_optimize_test/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
ecryptfs_kernel.h eCryptfs: Remove ecryptfs_unlink_sigs warnings 2009-04-22 04:08:46 -05:00
file.c
inode.c eCryptfs: Larger buffer for encrypted symlink targets 2009-04-22 17:02:46 -05:00
Kconfig
keystore.c
kthread.c
main.c eCryptfs: Remove ecryptfs_unlink_sigs warnings 2009-04-22 04:08:46 -05:00
Makefile
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