Whamcloud - gitweb
e2fsck: check for encrypted directory entries with too-short file names
authorTheodore Ts'o <tytso@mit.edu>
Thu, 16 Jul 2015 21:19:38 +0000 (17:19 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 16 Jul 2015 22:02:58 +0000 (18:02 -0400)
commite3dd5c6f1a1cf9baeb7073fe2ecc5214fdfe0621
treeeaea641017febfd5836781a312f0c082a72e930d
parent4ecd63d7869922dab94d88e6e0a4fa4c9f0d0c66
e2fsck: check for encrypted directory entries with too-short file names

If there are directory entries with file names which are less than 16
bytes, it turns out that passing less than the crypto block size to
the kernel's crypto layer will cause the kernel to crash.

However, since there never should be encrypted directory entries where
the file name is less than 16 bytes (the AES block size), change
e2fsck to offer to address this corruption by deleting the directory
entry.

(We need to checks for this condition into the kernel as well.)

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
e2fsck/pass2.c
e2fsck/problem.c
e2fsck/problem.h
lib/ext2fs/ext2_fs.h
tests/f_short_encrypted_dirent/expect.1 [new file with mode: 0644]
tests/f_short_encrypted_dirent/expect.2 [new file with mode: 0644]
tests/f_short_encrypted_dirent/image.gz [new file with mode: 0644]
tests/f_short_encrypted_dirent/name [new file with mode: 0644]