diff --git a/0044-tune2fs-do-not-change-j_tail_sequence-in-journal-sup.patch b/0044-tune2fs-do-not-change-j_tail_sequence-in-journal-sup.patch new file mode 100644 index 0000000000000000000000000000000000000000..dfb060895b9ca076cc26b68887f10e6c8be49188 --- /dev/null +++ b/0044-tune2fs-do-not-change-j_tail_sequence-in-journal-sup.patch @@ -0,0 +1,38 @@ +From 003125b2f00aed8f0a1d8b5bd80fcbb1e8e2f13e Mon Sep 17 00:00:00 2001 +From: zhanchengbin +Date: Thu, 4 Aug 2022 18:33:39 +0800 +Subject: [PATCH] tune2fs: do not change j_tail_sequence in journal superblock + +The function recover_ext3_journal() in debugfs/journal.c, if the log +replay is over, the j_tail_sequence in journal superblock is not +changed to the value of the last transaction sequence. This will +cause subsequent log commitids to count from the commitid in last +time. After tune2fs -e, the log commitid is counted from the commitid +in last time, if the log ID of the current operation overlaps with +that of the last operation, this will cause logs that were previously +replayed by tune2fs to be replayed here. + +Signed-off-by: zhanchengbin +Signed-off-by: Zhiqiang Liu +Signed-off-by: liangyun +Signed-off-by: Theodore Ts'o +--- + debugfs/journal.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/debugfs/journal.c b/debugfs/journal.c +index 095fff00..5bac0d3b 100644 +--- a/debugfs/journal.c ++++ b/debugfs/journal.c +@@ -769,6 +769,8 @@ static errcode_t recover_ext3_journal(ext2_filsys fs) + mark_buffer_dirty(journal->j_sb_buffer); + } + ++ journal->j_tail_sequence = journal->j_transaction_sequence; ++ + errout: + jbd2_journal_destroy_revoke(journal); + jbd2_journal_destroy_revoke_record_cache(); +-- +2.37.1 + diff --git a/e2fsprogs.spec b/e2fsprogs.spec index d2f8d913e70b9f2dea660bc1962555750d70033f..95fa747ad560f5193146a3b083ca69bab9c44093 100644 --- a/e2fsprogs.spec +++ b/e2fsprogs.spec @@ -1,6 +1,6 @@ Name: e2fsprogs Version: 1.45.6 -Release: 11 +Release: 12 Summary: Second extended file system management tools License: GPLv2 and LGPLv2 and GPLv2+ URL: http://e2fsprogs.sourceforge.net/ @@ -50,6 +50,7 @@ Patch40: 0040-e2fsck-add-env-param-E2FS_UNRELIABLE_IO-to-fi.patch Patch41: 0041-e2fsck-do-not-clean-up-file-acl-if-the-inode-is-trun.patch Patch42: 0042-e2fsck-handle-level-is-overflow-in-ext2fs_extent_get.patch Patch43: 0043-libext2fs-add-sanity-check-to-extent-manipulation.patch +Patch44: 0044-tune2fs-do-not-change-j_tail_sequence-in-journal-sup.patch BuildRequires: gcc pkgconfig texinfo BuildRequires: fuse-devel libblkid-devel libuuid-devel @@ -171,6 +172,9 @@ exit 0 %{_mandir}/man8/* %changelog +* Mon Aug 15 2022 yanxiaodan - 1.45.6-12 +- tune2fs: do not change j_tail_sequence in journal superblock + * Sat May 28 2022 zhanchengbin - 1.45.6-11 - e2fsck: fix CVE-2022-1304