diff -Nru e2fsprogs-1.42.9/debian/changelog e2fsprogs-1.42.9/debian/changelog --- e2fsprogs-1.42.9/debian/changelog 2015-09-02 00:08:12.000000000 +1200 +++ e2fsprogs-1.42.9/debian/changelog 2023-10-09 15:10:42.000000000 +1300 @@ -1,3 +1,13 @@ +e2fsprogs (1.42.9-3ubuntu1.4) trusty; 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 15:10:42 +1300 + e2fsprogs (1.42.9-3ubuntu1.3) trusty; urgency=medium * fix rule-violating lblk->pblk mappings on bigalloc filesystems (LP: #1321418) diff -Nru e2fsprogs-1.42.9/debian/patches/lp2036467-resize2fs-use-Direct-I-O-when-reading-the-superblock.patch e2fsprogs-1.42.9/debian/patches/lp2036467-resize2fs-use-Direct-I-O-when-reading-the-superblock.patch --- e2fsprogs-1.42.9/debian/patches/lp2036467-resize2fs-use-Direct-I-O-when-reading-the-superblock.patch 1970-01-01 12:00:00.000000000 +1200 +++ e2fsprogs-1.42.9/debian/patches/lp2036467-resize2fs-use-Direct-I-O-when-reading-the-superblock.patch 2023-10-09 15:10:39.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.42.9/resize/main.c +=================================================================== +--- e2fsprogs-1.42.9.orig/resize/main.c 2023-10-09 15:10:33.939421522 +1300 ++++ e2fsprogs-1.42.9/resize/main.c 2023-10-09 15:10:33.935421469 +1300 +@@ -307,6 +307,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; + diff -Nru e2fsprogs-1.42.9/debian/patches/series e2fsprogs-1.42.9/debian/patches/series --- e2fsprogs-1.42.9/debian/patches/series 2015-09-02 00:08:10.000000000 +1200 +++ e2fsprogs-1.42.9/debian/patches/series 2023-10-09 15:10:30.000000000 +1300 @@ -5,3 +5,4 @@ CVE-2015-0247.patch CVE-2015-1572.patch fix-multiply-claimed.patch +lp2036467-resize2fs-use-Direct-I-O-when-reading-the-superblock.patch