diff options
author | Baokun Li <[email protected]> | 2023-01-07 11:21:26 +0800 |
---|---|---|
committer | Theodore Ts'o <[email protected]> | 2023-02-19 00:09:59 -0500 |
commit | 3039d8b8692408438a618fac2776b629852663c3 (patch) | |
tree | 0a5ecb12895f89ed755e48f90a8ff0f3e2f39802 /tools/testing/selftests/bpf/progs/test_autoload.c | |
parent | 5cd740287ae5e3f9d1c46f5bfe8778972fd6d3fe (diff) |
ext4: update s_journal_inum if it changes after journal replay
When mounting a crafted ext4 image, s_journal_inum may change after journal
replay, which is obviously unreasonable because we have successfully loaded
and replayed the journal through the old s_journal_inum. And the new
s_journal_inum bypasses some of the checks in ext4_get_journal(), which
may trigger a null pointer dereference problem. So if s_journal_inum
changes after the journal replay, we ignore the change, and rewrite the
current journal_inum to the superblock.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=216541
Reported-by: Luís Henriques <[email protected]>
Signed-off-by: Baokun Li <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Theodore Ts'o <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_autoload.c')
0 files changed, 0 insertions, 0 deletions