]> git.baikalelectronics.ru Git - kernel.git/commit
ext4 crypto: check for too-short encrypted file names
authorTheodore Ts'o <tytso@mit.edu>
Fri, 17 Jul 2015 15:33:16 +0000 (11:33 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 17 Jul 2015 15:33:16 +0000 (11:33 -0400)
commitb341c907ee2263d5052314f13c029e1a0a536f70
tree69241de6fa96f6db690a1af7e6e76e2d35af93c2
parent897887903bffdbf37ef6990c067d219f798d3e18
ext4 crypto: check for too-short encrypted file names

An encrypted file name should never be shorter than an 16 bytes, the
AES block size.  The 3.10 crypto layer will oops and crash the kernel
if ciphertext shorter than the block size is passed to it.

Fortunately, in modern kernels the crypto layer will not crash the
kernel in this scenario, but nevertheless, it represents a corrupted
directory, and we should detect it and mark the file system as
corrupted so that e2fsck can fix this.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/crypto_fname.c