[Bug 2051898] [NEW] iso-scan mounts filesystems that may be part of a hibernation image which can cause data loss

Glenn Washburn 2051898 at bugs.launchpad.net
Thu Feb 1 04:13:41 UTC 2024


Public bug reported:

The iso-scan initrd feature is used to find the iso being used to boot
from, to allow booting from iso files. Block devices with supported
filesystems on them will be mounted and checked for the given path until
the path is found. The current list of supported filesystems is ext2,
ext3, ext4, xfs, jfs, reiserfs, vfat, ntfs, iso9660, btrfs, and udf. It
is well known that mounting ext3 and ext4 filesystems, even as readonly,
will modify the filesystem (by replaying the journal) and thus corrupt
the hibernation image. It is for this reason that #230703 was resolved
as "won't fix".

This situation can occur when a user wants to try the Ubuntu livecd via
SuperGrub disk or Ventoy. The user downloads the ISO to the correct
location on their multi-iso usb drive, then hibernates (because loosing
system state is more than annoying). When booting off the usb drive, the
Ubuntu iso's kernel and initrd are loaded and given the iso-scan
parameter with the ISO path (there is no ability to specify device).
During the initrd execution, block devices with support filesystems will
be mounted to look for the given iso. If a filesystem with a journal
needing to be replayed is mounted before the iso is found, then the
hibernation image may become corrupted. The user will try out the Ubuntu
iso successfully, but when trying to resume the previous system, the
resume may fail causing data loss.

** Affects: casper (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: hibernation

** Merge proposal linked:
   https://code.launchpad.net/~crass/casper/+git/casper/+merge/453083

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to casper in Ubuntu.
https://bugs.launchpad.net/bugs/2051898

Title:
  iso-scan mounts filesystems that may be part of a hibernation image
  which can cause data loss

Status in casper package in Ubuntu:
  New

Bug description:
  The iso-scan initrd feature is used to find the iso being used to boot
  from, to allow booting from iso files. Block devices with supported
  filesystems on them will be mounted and checked for the given path
  until the path is found. The current list of supported filesystems is
  ext2, ext3, ext4, xfs, jfs, reiserfs, vfat, ntfs, iso9660, btrfs, and
  udf. It is well known that mounting ext3 and ext4 filesystems, even as
  readonly, will modify the filesystem (by replaying the journal) and
  thus corrupt the hibernation image. It is for this reason that #230703
  was resolved as "won't fix".

  This situation can occur when a user wants to try the Ubuntu livecd
  via SuperGrub disk or Ventoy. The user downloads the ISO to the
  correct location on their multi-iso usb drive, then hibernates
  (because loosing system state is more than annoying). When booting off
  the usb drive, the Ubuntu iso's kernel and initrd are loaded and given
  the iso-scan parameter with the ISO path (there is no ability to
  specify device). During the initrd execution, block devices with
  support filesystems will be mounted to look for the given iso. If a
  filesystem with a journal needing to be replayed is mounted before the
  iso is found, then the hibernation image may become corrupted. The
  user will try out the Ubuntu iso successfully, but when trying to
  resume the previous system, the resume may fail causing data loss.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/casper/+bug/2051898/+subscriptions




More information about the foundations-bugs mailing list