• Theodore Ts'o's avatar
    ext4 crypto: check for too-short encrypted file names · 27977b69
    Theodore Ts'o authored
    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: default avatarTheodore Ts'o <tytso@mit.edu>
    27977b69
crypto_fname.c 11.9 KB