Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1604638
| From | Omar Sandoval <osandov@osandov.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC] AT_NO_JUMPS/LOOKUP_NO_JUMPS |
| Date | 2017-03-20 15:30 +0100 |
| Message-ID | <tn6tQ-5Wi-41@gated-at.bofh.it> (permalink) |
| References | <tmMOt-wC-3@gated-at.bofh.it> <tmUCl-5RZ-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Sun, Mar 19, 2017 at 06:46:01PM -0700, Linus Torvalds wrote: > On Sun, Mar 19, 2017 at 10:24 AM, Al Viro <viro@zeniv.linux.org.uk> wrote: > > Bringing back an old conversation - what do you think about the > > potential usefulness of the following ...at() option: > > * no mountpoint crossings allowed (mount --bind included) > > * only relative symlinks traversals are allowed > > * starting point acts as a chroot boundary (IOW, .. does not lead > > out of it) > > Hmm. The original use of this was iirc apache (or maybe samba), that > simply wanted to be sure that when you did a pathname lookup, it > didn't escape out of the subtree that the lookup was done from (eg > some public_html directory or whatever). > > But I had that discussions *long* ago, and I don't even remember who > it might have been with. My reaction at the time was simply that it > would have been easy for us to have a "no symlink traversal at all" > mode, because their solution was to just walk each path component > carefully by hand. > > Maybe somebody who knows apache (or samba) can pipe up and say "yeah, > we still do that", or "we solved it with our own filename cache, so we > don't care". The last posting of the O_BENEATH flag with very similar semantics indicated that there were sandboxing usecases that still want this [1]. I think it's a good idea; the kernel is in the best place to do this correctly instead of having a bunch of half-baked implementations in userspace everywhere. 1: http://marc.info/?l=linux-fsdevel&m=143945842819081&w=2
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[RFC] AT_NO_JUMPS/LOOKUP_NO_JUMPS Al Viro <viro@ZenIV.linux.org.uk> - 2017-03-19 18:30 +0100
Re: [RFC] AT_NO_JUMPS/LOOKUP_NO_JUMPS Linus Torvalds <torvalds@linux-foundation.org> - 2017-03-20 02:50 +0100
Re: [RFC] AT_NO_JUMPS/LOOKUP_NO_JUMPS Omar Sandoval <osandov@osandov.com> - 2017-03-20 15:30 +0100
csiph-web