]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
e2fsck: validate the targets of extent-based symlinks
authorEric Biggers <ebiggers@google.com>
Sat, 3 Mar 2018 00:59:21 +0000 (16:59 -0800)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 3 Mar 2018 22:12:32 +0000 (17:12 -0500)
commit9666fbfbd5d2f6a94566c427c3769ca73d3d01c7
treeb34412f888b809f02eb56b49bf81a4c1c65b703a
parent751efa803bde8b8f150d97e3208a1ce15a9da0bc
e2fsck: validate the targets of extent-based symlinks

e2fsck is validating the target (requiring that it be NUL-terminated at
i_size, or something a bit different for encrypted symlinks) of slow
symlinks that use a traditional block list but not ones that use an
extent tree.  As far as I can tell this is simply a bug: there's no
reason for the representation of the block list to affect how the
symlink target is validated.  And either way the kernel won't create
symlinks with embedded NULs and will always add a terminating NUL.

Thus, make e2fsck_pass1_check_symlink() start validating the targets of
extent-based symlinks.

Fixes: 7cadc57780f3 ("e2fsck: Support long symlinks which use extents")
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
e2fsck/pass1.c