[lkml]   [2017]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectPotential bug in path handling
I found this while writing a simple sandbox. Script to reproduce:

In the `bugbox`:

bugbox-4.3$ ls bin
(you get the files in /bin)


bugbox-4.3$ ls ../bin

Tried with latest 4.11 kernel. The problem occurs when you bind mount `/` to itself, and then remount it. Looks like one of the mount namespace, bind mount or pivot_root is mishandling root barrier, causing `../bin` referencing to the `bin` directory instead of the bind mount. This could be a security problem.

Any idea on what's the problem, or how to debug this?

* Dependencies of `bugbox`:
python 2 or 3
the `butter` package for syscall (sorry)
/bin /lib and /lib64 on your system are real, not symlinks
 \ /
  Last update: 2017-04-19 05:05    [W:0.035 / U:36.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site