<div dir="ltr"><div><div><div class="gmail_extra"><div class="gmail_quote">On Wed, Mar 11, 2015 at 12:20 PM, Marco <span dir="ltr"><<a href="mailto:foobar.angus@gmail.com" target="_blank">foobar.angus@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div>Ok, I've an Ubuntu trusty 14.04 and I've done some testing with it.<br></div>With an old lxc 1.0.6:<br>   lxc_1.0.6-0ubuntu0.1_amd64.deb<br></div>the problem is there: read-only bind mounts are not respected.<br></div>Upgrading to lxc 1.0.7:<br>   lxc_1.0.7-0ubuntu0.1_amd64.deb<br></div>solve the problem.<br><div><div><div><div><br></div><div>Debian Jessie is running lxc 1.0.6 so they need to be informed of the bug I suppose...<br></div><div>Is there someone from Debian here in the mailing list ?<span class=""><font color="#888888"><br><br></font></span></div></div></div></div></div></blockquote><div><br></div></div>It seems the problem on Debian is worse than expected...<br>Again:<br>Host: Debian 8 Jessie <br>Linux deb 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt4-3 (2015-02-03) x86_64 GNU/Linux<br>LXC: stock, 1.0.6-6<br>Guest: Debian 8 (no systemd)<br>Filesystem on host: ext4<br><br></div><div class="gmail_extra">If you have:<br>-  '/system' mounted RW on the host<br></div><div class="gmail_extra">- bind mounted RO on the guest (e.g. via lxc.mount.entry in the container config)<br></div><div class="gmail_extra">you should expect that:<br></div><div class="gmail_extra">a) guest has RO access : this is not the case for Debian Jessie & lxc 1.0.6 as I've reported<br></div><div class="gmail_extra">b) guest cannot change HOST mount (from RW to RO!): unfortunately the guest seems to be able to put RO the HOST filesystem<br><br></div><div class="gmail_extra">IMHO the (b) is a very _bad_ thing if others can reproduce the behaviour I'm experiencing. <br>Here is exactly the steps I've followed:<br></div><div class="gmail_extra">1) on the container config: lxc.mount.entry=/system system none ro,bind,create=dir 0 0<br></div><div class="gmail_extra">2) in the guest (user: root): the fs /system is available as rw (and this is a bug per se)<br>3) in the guest: mount -o remount,ro /system <br></div><div class="gmail_extra">    now the guest /system is read only : good<br></div><div class="gmail_extra">    but now the HOST /system is read only too: bad<br><br></div>Containers should never be able to alter the host filesystem access rights.<br></div>Are there other debian users that can confirm that?<br><br></div><div>Regards,<br><br></div><div>PS:<br></div><div>BTW, in the guest container if I:<br></div><div>- mount -o remount,rw /system<br></div><div>then in the host filesystem I've:<br></div><div>- /system mounted back as rw<br><br></div>-- Marco<br><div><div><div><div><br></div></div></div></div></div>