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

Bug #2051898 reported by Glenn Washburn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
casper (Ubuntu)
New
Undecided
Unassigned

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.

Tags: hibernation

Related branches

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.