← Back to team overview

kernel-packages team mailing list archive

[Bug 917446] Re: switch_root does not allow switching to a non-block device as the new root filesytem

 

** Changed in: linux (Ubuntu)
       Status: Confirmed => New

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/917446

Title:
  switch_root does not allow switching to a non-block device as the new
  root filesytem

Status in “linux” package in Ubuntu:
  Incomplete

Bug description:
  The current switch_root does a sanity check to ensure that it does not
  wipe out the new root filesystem by checking the device id of the
  parent and child directories. If they are the same, then the child
  directory is not considered a mount point and the contents are deleted
  recursively.

  This presents a problem because non-block device mounted file systems
  such as tmpfs and ramfs both report the same device id from struct
  stat. Which is '0'.

  So if you have your to-be root filesystem contained in a non-block
  device (/proc/filesystems: nodev entries), it will be wiped out before
  chroot/execve ever happens.

  This can be verified by running stat against the root and to-be root
  filesystems in the initramfs.

  Releases affected = All
  Versions affected = All

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