<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">2017-08-16 13:52 GMT+02:00 Bert Freudenberg <span dir="ltr"><<a href="mailto:bert@freudenbergs.de" target="_blank">bert@freudenbergs.de</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br><div dir="ltr"><div style="font-family:arial,helvetica,sans-serif;font-size:small;color:#000000"><span style="font-family:arial,sans-serif;color:rgb(34,34,34)">On Wed, Aug 16, 2017 at 1:36 PM, Denis Kudriashov </span><span dir="ltr" style="font-family:arial,sans-serif;color:rgb(34,34,34)"><<a href="mailto:dionisiydk@gmail.com" target="_blank">dionisiydk@gmail.com</a>></span><span style="font-family:arial,sans-serif;color:rgb(34,34,34)"> wrote:</span><br></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Eliot.<span><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><span style="color:rgb(0,0,0);font-size:12.800000190734863px">I asked David why he didn't add it to the SocketPlugin in the first place and he discussed Andreas Rabb's security concerns</span></blockquote><div><span style="color:rgb(0,0,0);font-size:12.800000190734863px"><br></span></div></span><div>It would be interesting to read about them because it looks strange that it is secure to manage OS handle from VM but not secure to manage it from image side. Both ways are requested by user directly or indirectly which means that user has OS permissions. So what the difference?</div></div></blockquote><div><br></div><div style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)">​It's for when yo​u want to allow arbitrary code to be executed in the image, yet still protect the machine from harm. This happens when sharing objects between images - an object could have malicious code attached. So in that case, before running the code, we turn on the VM file sandbox via the SecurityPlugin. This ensures that the image can only access files in a sandbox directory but not outside. But it only works if the FilePlugin is the only way to access files - meaning FFI and OSProcess etc. must be disabled, and there must not be another way to create file handles.</div></div></div></div></blockquote><div><br></div><div>Thank's Bert. It is clear but I wonder how it can really work. Because if you are able turn on/off VM file sandbox during image runtime then how system prevents arbitrary code to turn off this security back to perform bad actions?  </div><div>And if it is static setting for whole image session then why it is really useful? OS security solves all these issues.</div><div><br></div><div>I ask because I have no idea about SecurityPlugin. So maybe you will point me to some doc.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)"><br></div><div style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)">So IMHO, if the goal is to get a raw handle for using in FFI, then that's okay, since all security goes out the door as soon as FFI is enabled anyway. And if FFI is not enabled, then the raw file handle isn't useful, so there is no need to restrict read-access to it. Or am I missing something?</div><div style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)"><br></div><div style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)">TL;DR read-only access to raw file handle may not be a security issue.</div><div style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)"><br></div><div style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)">- Bert -</div></div></div></div>
<br></blockquote></div><br></div></div>