Whamcloud - gitweb
e2fsck: abort if there is a corrupted directory block when rehashing
authorTheodore Ts'o <tytso@mit.edu>
Fri, 20 Dec 2019 00:37:34 +0000 (19:37 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 9 Jan 2020 19:18:37 +0000 (14:18 -0500)
commit3d0a5b1c88214ef4b5ea28f25c2aacc1358b585c
tree83dbb3aebb623133aa5382b88cff4bc25702d5d0
parent06a93880532900a2a022167f2cc945acbf54902b
e2fsck: abort if there is a corrupted directory block when rehashing

In e2fsck pass 3a, when we are rehashing directories, at least in
theory, all of the directories should have had corruptions with
respect to directory entry structure fixed.  However, it's possible
(for example, if the user declined a fix) that we can reach this stage
of processing with a corrupted directory entries.

So check for that case and don't try to process a corrupted directory
block so we don't run into trouble in mutate_name() if there is a
zero-length file name.

Addresses-Debian-Bug: 948508
Addresses: TALOS-2019-0973
Addresses: CVE-2019-5188
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
(cherry picked from commit 8dd73c149f418238f19791f9d666089ef9734dff)
e2fsck/rehash.c