diff -Nru e2fsprogs-1.45.5/debian/changelog e2fsprogs-1.45.5/debian/changelog --- e2fsprogs-1.45.5/debian/changelog 2022-06-02 12:59:32.000000000 +1200 +++ e2fsprogs-1.45.5/debian/changelog 2023-10-09 14:56:01.000000000 +1300 @@ -1,3 +1,13 @@ +e2fsprogs (1.45.5-2ubuntu1.2) focal; urgency=medium + + * Fix superblock checksum mismatch during resize2fs operations, + most notably during online resize of cloud images during boot. + Read the superblock with Direct I/O to ensure we get the correct + view of the disk. (LP: #2036467) + - lp2036467-resize2fs-use-Direct-I-O-when-reading-the-superblock.patch + + -- Matthew Ruffell Mon, 09 Oct 2023 14:56:01 +1300 + e2fsprogs (1.45.5-2ubuntu1.1) focal-security; urgency=medium * SECURITY UPDATE: Out-of-bounds read/write vulnerability diff -Nru e2fsprogs-1.45.5/debian/patches/lp2036467-resize2fs-use-Direct-I-O-when-reading-the-superblock.patch e2fsprogs-1.45.5/debian/patches/lp2036467-resize2fs-use-Direct-I-O-when-reading-the-superblock.patch --- e2fsprogs-1.45.5/debian/patches/lp2036467-resize2fs-use-Direct-I-O-when-reading-the-superblock.patch 1970-01-01 12:00:00.000000000 +1200 +++ e2fsprogs-1.45.5/debian/patches/lp2036467-resize2fs-use-Direct-I-O-when-reading-the-superblock.patch 2023-10-09 14:55:58.000000000 +1300 @@ -0,0 +1,32 @@ +commit 43a498e938887956f393b5e45ea6ac79cc5f4b84 +Author: Theodore Ts'o +Date: Thu, 15 Jun 2023 00:17:01 -0400 +Subject: resize2fs: use Direct I/O when reading the superblock for + online resizes + + If the file system is mounted, the superblock can be changing while + resize2fs is trying to read the superblock, resulting in checksum + failures. One way of avoiding this problem is read the superblock + using Direct I/O, since the kernel makes sure that what gets written + to disk is self-consistent. + + Suggested-by: Krister Johansen + Signed-off-by: Theodore Ts'o +Bug-Ubuntu: https://bugs.launchpad.net/bugs/2036467 +Bug: https://lore.kernel.org/linux-ext4/20230609042239.GA1436857@mit.edu/ +Origin: upstream, https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git/commit/?id=43a498e938887956f393b5e45ea6ac79cc5f4b84 +Last-Update: 2023-10-09 + +Index: e2fsprogs-1.45.5/resize/main.c +=================================================================== +--- e2fsprogs-1.45.5.orig/resize/main.c 2023-10-09 14:55:54.029730561 +1300 ++++ e2fsprogs-1.45.5/resize/main.c 2023-10-09 14:55:54.025730432 +1300 +@@ -401,6 +401,8 @@ + + if (!(mount_flags & EXT2_MF_MOUNTED)) + io_flags = EXT2_FLAG_RW | EXT2_FLAG_EXCLUSIVE; ++ if (mount_flags & EXT2_MF_MOUNTED) ++ io_flags |= EXT2_FLAG_DIRECT_IO; + + io_flags |= EXT2_FLAG_64BITS; + if (undo_file) { diff -Nru e2fsprogs-1.45.5/debian/patches/series e2fsprogs-1.45.5/debian/patches/series --- e2fsprogs-1.45.5/debian/patches/series 2022-06-02 12:58:36.000000000 +1200 +++ e2fsprogs-1.45.5/debian/patches/series 2023-10-09 14:55:51.000000000 +1300 @@ -1,3 +1,4 @@ 0001-libcom_err-deal-with-the-fact-that-the-Hurd-error-messages default-to-4k.patch CVE-2022-1304.patch +lp2036467-resize2fs-use-Direct-I-O-when-reading-the-superblock.patch