Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions SPECS/e2fsprogs/CVE-2024-e2fsck-orphan-file-skip-check.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
From a8df015009e7cd71b411f21e7d6f0797a28cba5c Mon Sep 17 00:00:00 2001
From: Luis Henriques (SUSE) <luis.henriques@linux.dev>
Date: Tue, 11 Jun 2024 15:27:04 +0100
Subject: [PATCH] e2fsck: don't skip checks if the orphan file is present in
the filesystem

If the filesystem supports the orphan file feature and that file is present
then don't skip the filesystem checks as that file may need to be
cleaned up.

Signed-off-by: Luis Henriques (SUSE) <luis.henriques@linux.dev>
Link: https://lore.kernel.org/r/20240611142704.14307-2-luis.henriques@linux.dev
Signed-off-by: Theodore Ts'o <tytso@mit.edu>

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2318710
Addresses: https://bugzilla.suse.com/show_bug.cgi?id=1226043
---
e2fsck/unix.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/e2fsck/unix.c b/e2fsck/unix.c
index 7f0f77f..b3a1234 100644
--- a/e2fsck/unix.c
+++ b/e2fsck/unix.c
@@ -370,6 +370,10 @@ static void check_if_skip(e2fsck_t ctx)
if (ctx->options & E2F_OPT_JOURNAL_ONLY)
goto skip;

+ if (ext2fs_has_feature_orphan_file(fs->super) &&

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Patch looks good w.r.t upstream.
How have we verified this ?

@Sumynwa Sumedh Alok Sharma (Sumynwa) Aug 7, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

+ ext2fs_has_feature_orphan_present(fs->super))
+ return;
+
lastcheck = fs->super->s_lastcheck;
if (lastcheck > ctx->now)
lastcheck -= ctx->time_fudge;
--
2.39.2

9 changes: 8 additions & 1 deletion SPECS/e2fsprogs/e2fsprogs.spec
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
Summary: Contains the utilities for the ext2 file system
Name: e2fsprogs
Version: 1.47.0
Release: 2%{?dist}
Release: 3%{?dist}
License: GPLv2 AND LGPLv2 AND BSD AND MIT
Vendor: Microsoft Corporation
Distribution: Azure Linux
Group: System Environment/Base
URL: http://e2fsprogs.sourceforge.net
Source0: https://prdownloads.sourceforge.net/e2fsprogs/%{name}-%{version}.tar.gz
Patch0: CVE-2024-e2fsck-orphan-file-skip-check.patch
Requires: %{name}-libs = %{version}-%{release}
Conflicts: toybox

Expand Down Expand Up @@ -148,6 +149,12 @@ done
%defattr(-,root,root)

%changelog
* Wed Aug 06 2025 Ankita Pareek <ankitapareek@microsoft.com> - 1.47.0-3
- Backport upstream fix for e2fsck skipping checks when orphan file is present
- Resolves: emergency mode after unclean reboot on filesystems with orphan_file feature
- Upstream commit: a8df015009e7cd71b411f21e7d6f0797a28cba5c
- Reference: https://bugzilla.redhat.com/show_bug.cgi?id=2318710

* Mon Aug 19 2024 Andrew Phelps <anphel@microsoft.com> - 1.47.0-2
- Remove known bad package test

Expand Down
6 changes: 3 additions & 3 deletions toolkit/resources/manifests/package/pkggen_core_aarch64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ rpm-lang-4.18.2-1.azl3.aarch64.rpm
rpm-libs-4.18.2-1.azl3.aarch64.rpm
cpio-2.14-1.azl3.aarch64.rpm
cpio-lang-2.14-1.azl3.aarch64.rpm
e2fsprogs-libs-1.47.0-2.azl3.aarch64.rpm
e2fsprogs-1.47.0-2.azl3.aarch64.rpm
e2fsprogs-devel-1.47.0-2.azl3.aarch64.rpm
e2fsprogs-libs-1.47.0-3.azl3.aarch64.rpm
e2fsprogs-1.47.0-3.azl3.aarch64.rpm
e2fsprogs-devel-1.47.0-3.azl3.aarch64.rpm
libsolv-0.7.28-5.azl3.aarch64.rpm
libsolv-devel-0.7.28-5.azl3.aarch64.rpm
libssh2-1.11.1-5.azl3.aarch64.rpm
Expand Down
6 changes: 3 additions & 3 deletions toolkit/resources/manifests/package/pkggen_core_x86_64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ rpm-lang-4.18.2-1.azl3.x86_64.rpm
rpm-libs-4.18.2-1.azl3.x86_64.rpm
cpio-2.14-1.azl3.x86_64.rpm
cpio-lang-2.14-1.azl3.x86_64.rpm
e2fsprogs-libs-1.47.0-2.azl3.x86_64.rpm
e2fsprogs-1.47.0-2.azl3.x86_64.rpm
e2fsprogs-devel-1.47.0-2.azl3.x86_64.rpm
e2fsprogs-libs-1.47.0-3.azl3.x86_64.rpm
e2fsprogs-1.47.0-3.azl3.x86_64.rpm
e2fsprogs-devel-1.47.0-3.azl3.x86_64.rpm
libsolv-0.7.28-5.azl3.x86_64.rpm
libsolv-devel-0.7.28-5.azl3.x86_64.rpm
libssh2-1.11.1-5.azl3.x86_64.rpm
Expand Down
10 changes: 5 additions & 5 deletions toolkit/resources/manifests/package/toolchain_aarch64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ docbook-dtd-xml-4.5-11.azl3.noarch.rpm
docbook-style-xsl-1.79.1-14.azl3.noarch.rpm
dwz-0.14-2.azl3.aarch64.rpm
dwz-debuginfo-0.14-2.azl3.aarch64.rpm
e2fsprogs-1.47.0-2.azl3.aarch64.rpm
e2fsprogs-debuginfo-1.47.0-2.azl3.aarch64.rpm
e2fsprogs-devel-1.47.0-2.azl3.aarch64.rpm
e2fsprogs-lang-1.47.0-2.azl3.aarch64.rpm
e2fsprogs-libs-1.47.0-2.azl3.aarch64.rpm
e2fsprogs-1.47.0-3.azl3.aarch64.rpm
e2fsprogs-debuginfo-1.47.0-3.azl3.aarch64.rpm
e2fsprogs-devel-1.47.0-3.azl3.aarch64.rpm
e2fsprogs-lang-1.47.0-3.azl3.aarch64.rpm
e2fsprogs-libs-1.47.0-3.azl3.aarch64.rpm
elfutils-0.189-6.azl3.aarch64.rpm
elfutils-debuginfo-0.189-6.azl3.aarch64.rpm
elfutils-default-yama-scope-0.189-6.azl3.noarch.rpm
Expand Down
10 changes: 5 additions & 5 deletions toolkit/resources/manifests/package/toolchain_x86_64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ docbook-dtd-xml-4.5-11.azl3.noarch.rpm
docbook-style-xsl-1.79.1-14.azl3.noarch.rpm
dwz-0.14-2.azl3.x86_64.rpm
dwz-debuginfo-0.14-2.azl3.x86_64.rpm
e2fsprogs-1.47.0-2.azl3.x86_64.rpm
e2fsprogs-debuginfo-1.47.0-2.azl3.x86_64.rpm
e2fsprogs-devel-1.47.0-2.azl3.x86_64.rpm
e2fsprogs-lang-1.47.0-2.azl3.x86_64.rpm
e2fsprogs-libs-1.47.0-2.azl3.x86_64.rpm
e2fsprogs-1.47.0-3.azl3.x86_64.rpm
e2fsprogs-debuginfo-1.47.0-3.azl3.x86_64.rpm
e2fsprogs-devel-1.47.0-3.azl3.x86_64.rpm
e2fsprogs-lang-1.47.0-3.azl3.x86_64.rpm
e2fsprogs-libs-1.47.0-3.azl3.x86_64.rpm
elfutils-0.189-6.azl3.x86_64.rpm
elfutils-debuginfo-0.189-6.azl3.x86_64.rpm
elfutils-default-yama-scope-0.189-6.azl3.noarch.rpm
Expand Down
Loading