]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
e2fsck: validate that fscrypt_symlink_data.len is not too large
authorEric Biggers <ebiggers@google.com>
Sat, 3 Mar 2018 00:59:17 +0000 (16:59 -0800)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 3 Mar 2018 21:15:30 +0000 (16:15 -0500)
commit0af827988f07386898efdf83271900f91eb507b1
tree367134e842fb3c07cc29e6483595854d9645526b
parent6471c19d8edc66ef85c03f83502fc673e7313f74
e2fsck: validate that fscrypt_symlink_data.len is not too large

Make e2fsck start validating that the ciphertext length stored in the
header of an encrypted symlink target, plus the header itself, is no
larger than a filesystem block.  Previously e2fsck only verified that
this size is not exactly equal to a filesystem block.  This was
sufficient for unencrypted symlinks, where the "actual length" is
computed using strnlen(), but not for encrypted symlinks; the kernel
also considers encrypted symlinks with too-large ciphertext length to be
invalid.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
e2fsck/pass1.c