Whamcloud - gitweb
e2fsck: sanity check the journal inode number
authorTheodore Ts'o <tytso@mit.edu>
Mon, 30 May 2022 23:17:30 +0000 (19:17 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 30 May 2022 23:17:30 +0000 (19:17 -0400)
commit40196f3b493a55728f8f3a6591d52867ef613e3c
tree57100221bc139d93b68bf7ff0f14e99d7ad1d91f
parented54397b414def44d8ef11b4e320d9809d5fa294
e2fsck: sanity check the journal inode number

E2fsck replays the journal before sanity checking the full superblock.
So it's possible that the journal inode number is not valid relative
to the number of block groups.  So to avoid potentially an array
bounds overrun, sanity check this before trying to find the journal
inode.

Reported-by: Nils Bars <nils.bars@rub.de>
Reported-by: Moritz Schlögel <moritz.schloegel@rub.de>
Reported-by: Nico Schiller <nico.schiller@rub.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
e2fsck/journal.c