<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2015-08-26 15:48 GMT+02:00 John Crispin <span dir="ltr"><<a href="mailto:blogic@openwrt.org" target="_blank">blogic@openwrt.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
On 26/08/2015 01:00, Etienne CHAMPETIER wrote:<br>
> This patch series rework a bit ujail,<br>
> and add capabilities support to it<br>
<br>
</span>nice<br>
<span class=""><br>
><br>
> Seccomp filter are very powerful but not totally generic,<br>
> each arch can have different set of syscalls,<br>
> each libc can use different syscall for the same function,<br>
> and seccomp isn't supported on all arch.<br>
><br>
> Capabilities are more high level, but still can restrict<br>
> jail to a sane minimum of privileges.<br>
<br>
<br>
><br>
> Patch 4 is a bit big and i can split it if needed, just tell me how<br>
<br>
</span>will have a closer look next few days<br></blockquote><div>forgot to say it's tested on ar71xx with CC (and also on ubuntu 14.04)<br> <br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
there seem to be a way to escape from the rebind mount jail that QCA has<br>
found</blockquote><div>more than one ;) can you share? (with root rights you can kexec, mount /dev, ...)<br></div><div>that's why you really need to limit rights with capabilities drop or seccomp filter<br></div><div>(i'm adding a vague warning in usage)<br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">and i have not had the time yet to finish my jailfs module.</blockquote><div>with my patches you don't see all the bind mount anymore ("in the host"),<br></div><div>they are only in the jail mount namespace.<br><br></div><div>to see the mounts inside the jail you can still do<br></div><div>cat /proc/<jailed process pid>/mounts<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> it<br>
runs and loads, i can do mounts and access files inside them using<br>
normal shell calls. however if is point a jail instance at the<br>
mountpoint it oops horribly. i suspect that i am either using vfs wrong<br>
or am missing locking/ref-counting somewhere. i'll throw the code onto<br>
github later today or tomorrow and post the link. maybe someone with<br>
more knowledge of vfs can help fix it.<br></blockquote><div>what problem are you fixing with jailfs? (real question/to be sure there is no simpler solution)<br></div><div><br></div></div><br></div></div>