← Back to team overview

kernel-packages team mailing list archive

[Bug 1347746] [NEW] Overlayfs breaks /proc/self/exe link

 

Public bug reported:

Overlayfs breaks /proc/self/exe link when mounted not to VFS root.
This issue, for example, breaks clang which uses /proc/self/exe to recursively exec self.

Test case:
$ mkdir /tmp/bug/ && cd /tmp/bug
$ mkdir lower upper mount
$ cp `which readlink` upper
$ sudo mount -t overlayfs -o lowerdir=lower,upperdir=upper none mount
$ ./upper/readlink /proc/self/exe
/tmp/bug/upper/readlink
$ ./mount/readlink /proc/self/exe
/readlink

At the same time aufs don't break /proc/self/exe:
$ sudo umount mount/
$ sudo mount -t aufs -o noxino,br=upper:lower none mount/
$ ./mount/readlink /proc/self/exe
/tmp/bug/mount/readlink

** Affects: linux-meta (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: overlayfs

** Package changed: linux-lowlatency (Ubuntu) => linux-meta (Ubuntu)

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

Title:
  Overlayfs breaks /proc/self/exe link

Status in “linux-meta” package in Ubuntu:
  New

Bug description:
  Overlayfs breaks /proc/self/exe link when mounted not to VFS root.
  This issue, for example, breaks clang which uses /proc/self/exe to recursively exec self.

  Test case:
  $ mkdir /tmp/bug/ && cd /tmp/bug
  $ mkdir lower upper mount
  $ cp `which readlink` upper
  $ sudo mount -t overlayfs -o lowerdir=lower,upperdir=upper none mount
  $ ./upper/readlink /proc/self/exe
  /tmp/bug/upper/readlink
  $ ./mount/readlink /proc/self/exe
  /readlink

  At the same time aufs don't break /proc/self/exe:
  $ sudo umount mount/
  $ sudo mount -t aufs -o noxino,br=upper:lower none mount/
  $ ./mount/readlink /proc/self/exe
  /tmp/bug/mount/readlink

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


Follow ups

References