[Bug 2018271] Re: os-prober expects to run in a new private mount namespace, but new namespace is not private

Dan Bungert 2018271 at bugs.launchpad.net
Tue May 2 10:13:39 UTC 2023


It's a little bit ceremonial, but I think it sensible to declare a
relationship to the util-linux package.  Recommends sounds appropriate.

Otherwise LGTM.

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

Title:
  os-prober expects to run in a new private mount namespace, but new
  namespace is not private

Status in os-prober package in Ubuntu:
  New
Status in os-prober package in Debian:
  Unknown

Bug description:
  During execution of os-prober, other processes on the system can see the
  temporary mounts to /var/lib/os-prober/mount even though os-prober runs
  in a separate mount namespace.

  In order to run os-prober in a more isolated mode, we introduced the
  newns.c source file a while ago. We build it to a binary and ship it in
  os-prober and os-prober-udeb.

  The original idea was to run os-prober in a private mount namespace.
  Sadly, calling the unshare(CLONE_NEWNS) system call is only enough to
  create a new mount namespace. But it is not enough to make the new
  namespace private.

  While we can patch newns.c to make the new mount namespace private,
  relying on unshare(1) from util-linux (which is an essential package)
  seems like a more viable option.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/os-prober/+bug/2018271/+subscriptions




More information about the foundations-bugs mailing list