Loopback mount escape fixes
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 of 4 patches 18 repliesIn review
2 of 4 patches are in this archive. The cover letter announces 4.
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 3/4 | vfs: Handle mounts whose parents are unreachable from their mountpointfs/ fs/ | +27 | 0 replies | |
| 4/4 | vfs: Do not allow escaping from bind mounts.fs/ fs/ fs/ | +81 | 9 replies |
Reviews trailers per patch
None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | NeilBrown |
|---|---|
| Series | R-b R-b |
| 3/4 | |
| 4/4 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH review 0/4] Loopback mount escape fixes
After the last round of feedback I sat down and played with my fix for the fact that a strategically placed rename, ".." on bind mounts go up past the root of the bind mount.
The code better handles the escaped directory returning into it's bind mount, and is now roughly a constant factor cost in all cases from what the code costs without the fix.
So I think I have found a better tradeoff between fixing this bug and not slowing down path name lookups in the common case.
These fixes are against on v4.0-rc6.
For those who like to see everything in a single tree the code is at:
git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace.git for-testing
Eric W. Biederman (4):
mnt: Track which mounts use a dentry as root.
vfs: Test for and handle paths that are unreachable from their mnt_root
vfs: Handle mounts whose parents are unreachable from their mountpoint
vfs: Do not allow escaping from bind mounts.
fs/dcache.c | 82 +++++++++++++++++++++++++++--- fs/internal.h | 2 + fs/mount.h | 6 +++ fs/namei.c | 57 +++++++++++++++++---- fs/namespace.c | 135 +++++++++++++++++++++++++++++++++++++++++++++++-- include/linux/dcache.h | 13 +++++ include/linux/namei.h | 2 + 7 files changed, 277 insertions(+), 20 deletions(-)