<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">+1<div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 16 Aug 2017, at 02:13, Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com" class="">eliot.miranda@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi All,<div class=""><br class=""></div><div class="">    recently Denis Kudriashov wanted to access the OS handle of a Socket from the image to pass through the FFI.  David Lewis pointed out that the AioPlugin provides a primitive to do this.  I asked David why he didn't add it to the SocketPlugin in the first place and he discussed Andreas Rabb's security concerns.  It strikes me</div><div class="">a) that accessing the OS handle of a file or a socket is extremely useful in some circumstances and invalid in others</div><div class="">b) having handle access in a secondary plugin is inconvenient to say the least</div><div class="">c) having access only to Socket handles and not to file handles is also inconvenient.</div><div class=""><br class=""></div><div class="">So I propose adding a SecurityPlugin facility to control handle access, which would be granted by default, and to add primitives to both the SocketPlugin and FilePlugin to answer the native OS handle when the SecurityPlugin grants permission.</div><div class=""><br class=""></div><div class="">I also propose adding a compilation flag to the Windows VM to allow compiling out Andreas' handle management, which consists merely of maintaining a table of the file handles (not the socket handles) that have been created by the VM.  It strikes me that a much better solution is merely to encrypt the handle via xoring with a value created at random.  I don't see how Andreas' solution adds value, especially since it is not implemented on other platforms, and merely adds overhead.</div><div class=""><br class=""></div><div class="">Thoughts?  Objections?<br class=""><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class=""><div class=""><span style="font-size:small;border-collapse:separate" class=""><div class="">_,,,^..^,,,_<br class=""></div><div class="">best, Eliot</div></span></div></div></div>
</div></div>
</div></blockquote></div><br class=""></div></body></html>