summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2015-08-15 20:27:13 -0500
committerWilly Tarreau <w@1wt.eu>2015-12-06 00:49:00 +0100
commit44930ae43fd7adc1f3a5f6aa71784b863e5a3907 (patch)
tree91a6408409f73c5db9309f340a9c20b167e51af6 /crypto
parentfc9e08aac437c910e55f032a43bf70a22e5a038b (diff)
vfs: Test for and handle paths that are unreachable from their mnt_root
commit 397d425dc26da728396e66d392d5dcb8dac30c37 upstream. In rare cases a directory can be renamed out from under a bind mount. In those cases without special handling it becomes possible to walk up the directory tree to the root dentry of the filesystem and down from the root dentry to every other file or directory on the filesystem. Like division by zero .. from an unconnected path can not be given a useful semantic as there is no predicting at which path component the code will realize it is unconnected. We certainly can not match the current behavior as the current behavior is a security hole. Therefore when encounting .. when following an unconnected path return -ENOENT. - Add a function path_connected to verify path->dentry is reachable from path->mnt.mnt_root. AKA to validate that rename did not do something nasty to the bind mount. To avoid races path_connected must be called after following a path component to it's next path component. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Willy Tarreau <w@1wt.eu>
Diffstat (limited to 'crypto')
0 files changed, 0 insertions, 0 deletions