e2fsprogs: backport fix for e2fsck skipping checks with orphan_file f… - #18338
e2fsprogs: backport fix for e2fsck skipping checks with orphan_file f…#18338Ankita Pareek (Ankita13-code) wants to merge 1 commit into
Conversation
e57927f to
6fb069e
Compare
| if (ctx->options & E2F_OPT_JOURNAL_ONLY) | ||
| goto skip; | ||
|
|
||
| + if (ext2fs_has_feature_orphan_file(fs->super) && |
There was a problem hiding this comment.
Patch looks good w.r.t upstream.
How have we verified this ?
There was a problem hiding this comment.
Adding to what Muhammad Falak R Wani (@mfrw) said about testing, upstream patch has added tests for this fix. Can we check if we can apply that patch and run ptest?
There was a problem hiding this comment.
Muhammad Falak R Wani (@mfrw) I have verified these changes as follows -
- Patch applies cleanly to 1.47.0 source
- Buddy build succeeded: https://dev.azure.com/mariner-org/mariner/_build/results?buildId=1176657&view=results
This exact patch was validated in production by Fedora (e2fsprogs-1.47.1-6.fc41, confirmed in BZ#2318710 comment 43) and SUSE (BZ#1226043) - Test RPMs have been shared with the partner team for validation on their environment . Awaiting confirmation
Sumedh Alok Sharma (@Sumynwa) Good call. The upstream patch series (lore link) indeed includes a companion test (f_clear_orphan_file). However, that test depends on other 1.47.1+ infrastructure changes (e.g. ext2fs_get_tstamp) that aren't present in our 1.47.0 base, so backporting the test cleanly would require additional patches and probably not necessary for our scenario since we have already shared the test rpms with partner team to test.
…eature After an unclean reboot, e2fsck could skip filesystem checks even when orphan inodes are present on filesystems with the orphan_file feature enabled. This caused the kernel to reject mounting with 'bad orphan inode' errors, dropping the system into emergency mode. Backport upstream commit a8df015009e7cd71b411f21e7d6f0797a28cba5c which adds a check in check_if_skip() to not skip when both orphan_file and orphan_present features are set. This fix was confirmed working by Fedora (1.47.1-6) and SUSE. Reference: https://bugzilla.redhat.com/show_bug.cgi?id=2318710 Reference: https://bugzilla.suse.com/show_bug.cgi?id=1226043 Upstream: tytso/e2fsprogs@a8df015 Signed-off-by: Ankita Pareek <ankitapareek@microsoft.com>
6fb069e to
2595b98
Compare
|
The circular dependency check failure is pre-existing on 3.0-dev. The last 5 runs on the base branch all show the same failure. This change only adds a patch file and bumps the release; no dependency changes were made. |
Muhammad Falak R Wani (mfrw)
left a comment
There was a problem hiding this comment.
Local Build Okay.
LGTM
Thanks
Merge Checklist
*-staticsubpackages, etc.) have had theirReleasetag incremented.*.signatures.jsonfilessudo make go-tidy-allandsudo make go-test-coveragepassSummary
Backport upstream fix for e2fsck incorrectly skipping filesystem checks when the
orphan_filefeature is enabled and orphan inodes are present. After an unclean reboot, this causes the kernel to reject mounting with "bad orphan inode" errors, dropping the system into emergency mode.The fix is a minimal 4-line backport of upstream commit a8df015 which adds a check in
check_if_skip()to force e2fsck to run when bothorphan_fileandorphan_presentsuperblock features are set.This same fix was validated by Fedora (e2fsprogs-1.47.1-6) and SUSE, and confirmed working by multiple independent testers.
Change Log
CVE-2024-e2fsck-orphan-file-skip-check.patch)Does this affect the toolchain?
YES
Associated issues
Links to CVEs
Test Methodology