diff --git a/SPECS-SIGNED/systemd-boot-signed/systemd-boot-signed.spec b/SPECS-SIGNED/systemd-boot-signed/systemd-boot-signed.spec index 73238100e8d..381e6c76687 100644 --- a/SPECS-SIGNED/systemd-boot-signed/systemd-boot-signed.spec +++ b/SPECS-SIGNED/systemd-boot-signed/systemd-boot-signed.spec @@ -20,7 +20,7 @@ Version: 255 # determine the build information from local checkout Version: %(tools/meson-vcs-tag.sh . error | sed -r 's/-([0-9])/.^\1/; s/-g/_g/') %endif -Release: 34%{?dist} +Release: 35%{?dist} License: LGPL-2.1-or-later AND MIT AND GPL-2.0-or-later Vendor: Microsoft Corporation Distribution: Azure Linux @@ -98,6 +98,9 @@ popd /boot/efi/EFI/BOOT/%{grubefiname} %changelog +* Fri Aug 28 2026 Pawel Winogrodzki - 255-35 +- Bump release to match systemd spec. + * Mon Aug 17 2026 Aditya Singh - 255-34 - Bump release to match systemd spec. diff --git a/SPECS/systemd/systemd-fsck-lock-whole-disk.patch b/SPECS/systemd/systemd-fsck-lock-whole-disk.patch new file mode 100644 index 00000000000..3945463148e --- /dev/null +++ b/SPECS/systemd/systemd-fsck-lock-whole-disk.patch @@ -0,0 +1,77 @@ +diff --git a/src/fsck/fsck.c b/src/fsck/fsck.c +index 000ed69..8eb209a 100644 +--- a/src/fsck/fsck.c ++++ b/src/fsck/fsck.c +@@ -15,6 +15,7 @@ + #include "sd-device.h" + + #include "alloc-util.h" ++#include "blockdev-util.h" + #include "bus-common-errors.h" + #include "bus-error.h" + #include "bus-locator.h" +@@ -23,6 +24,7 @@ + #include "fd-util.h" + #include "fs-util.h" + #include "fsck-util.h" ++#include "lock-util.h" + #include "main-func.h" + #include "parse-util.h" + #include "path-util.h" +@@ -233,8 +235,45 @@ static int fsck_progress_socket(void) { + return TAKE_FD(fd); + } + ++static int lock_whole_disk(const char *device) { ++ _cleanup_free_ char *whole_disk = NULL; ++ _cleanup_close_ int fd = -EBADF; ++ struct stat st; ++ dev_t devno; ++ int r; ++ ++ assert(device); ++ ++ r = path_get_whole_disk(device, /* backing = */ false, &devno); ++ if (r < 0) ++ return log_error_errno(r, "Failed to find whole block device for '%s': %m", device); ++ ++ r = devname_from_devnum(S_IFBLK, devno, &whole_disk); ++ if (r < 0) ++ return log_error_errno(r, "Failed to resolve whole block device for '%s': %m", device); ++ ++ fd = open(whole_disk, O_RDONLY|O_CLOEXEC|O_NONBLOCK|O_NOCTTY); ++ if (fd < 0) ++ return log_error_errno(errno, "Failed to open whole block device '%s': %m", whole_disk); ++ ++ if (fstat(fd, &st) < 0) ++ return log_error_errno(errno, "Failed to stat whole block device '%s': %m", whole_disk); ++ if (!S_ISBLK(st.st_mode) || st.st_rdev != devno) ++ return log_error_errno(SYNTHETIC_ERRNO(ENXIO), ++ "Path '%s' no longer refers to block device %u:%u.", ++ whole_disk, major(devno), minor(devno)); ++ ++ r = lock_generic(fd, LOCK_BSD, LOCK_EX); ++ if (r < 0) ++ return log_error_errno(r, "Failed to lock whole block device '%s': %m", whole_disk); ++ ++ log_debug("Locked whole block device %s while checking %s.", whole_disk, device); ++ return TAKE_FD(fd); ++} ++ + static int run(int argc, char *argv[]) { + _cleanup_close_pair_ int progress_pipe[2] = EBADF_PAIR; ++ _cleanup_close_ int lock_fd = -EBADF; + _cleanup_(sd_device_unrefp) sd_device *dev = NULL; + _cleanup_free_ char *dpath = NULL; + _cleanup_fclose_ FILE *console = NULL; +@@ -333,6 +372,10 @@ static int run(int argc, char *argv[]) { + } + } + ++ lock_fd = lock_whole_disk(device); ++ if (lock_fd < 0) ++ return lock_fd; ++ + console = fopen("/dev/console", "we"); + if (console && + arg_show_progress && diff --git a/SPECS/systemd/systemd.spec b/SPECS/systemd/systemd.spec index bc46e768f95..059ccc0f2ef 100644 --- a/SPECS/systemd/systemd.spec +++ b/SPECS/systemd/systemd.spec @@ -50,7 +50,7 @@ Version: 255 # determine the build information from local checkout Version: %(tools/meson-vcs-tag.sh . error | sed -r 's/-([0-9])/.^\1/; s/-g/_g/') %endif -Release: 34%{?dist} +Release: 35%{?dist} # FIXME - hardcode to 'stable' for now as that's what we have in our blobstore %global stable 1 @@ -162,6 +162,13 @@ Patch0914: Prevent-corruption-from-stale-alias-state-on-daemon-reload.patch Patch0915: CVE-2026-15059.patch Patch0916: CVE-2026-16742.patch +# Alternative to the proposed native e2fsprogs whole-disk lock: +# https://lore.kernel.org/linux-ext4/20260824161512.1332649-1-naraghavan@linux.microsoft.com/ +# Do not ship both implementations. systemd-fsck retains its exclusive +# lock while waiting for fsck; native e2fsck locking would then block on +# a second independently-opened lock and deadlock boot. +Patch0917: systemd-fsck-lock-whole-disk.patch + %ifarch %{ix86} x86_64 aarch64 %global want_bootloader 1 %endif @@ -1259,6 +1266,10 @@ rm -f %{name}.lang # %autochangelog. So we need to continue manually maintaining the # changelog here. %changelog +* Fri Aug 28 2026 Pawel Winogrodzki - 255-35 +- Lock the whole disk in systemd-fsck while its child fsck process checks + the filesystem. + * Thu Aug 13 2026 Azure Linux Security Servicing Account - 255-34 - Patch for CVE-2026-16742, CVE-2026-15059