We are about to compile Tor Browser for Windows with --disable-sandbox as it breaks with mingw-w64 otherwise (https://bugzilla.mozilla.org/show_bug.cgi?id=1042426). One of the main problems is that SEH is not available in GCC mainly due to patent issues (See: https://gcc.gnu.org/wiki/WindowsGCCImprovements section Structured Exception Handling (SEH)). According to Jacek the patent expired but still there has no one written the proper code for GCC yet.
We might want to think about ways to get that fixed for us by third parties I guess.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items 0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Linked items 0
Link issues together to show that they're related.
Learn more.
As an update: Jacek wrote a WIP patch that should be able to do the trick for us and I opened https://bugzilla.mozilla.org/show_bug.cgi?id=1230910 to track the process of getting the problem fixed in Mozilla itself.
As an update: Jacek wrote a WIP patch that should be able to do the trick for us and I opened https://bugzilla.mozilla.org/show_bug.cgi?id=1230910 to track the process of getting the problem fixed in Mozilla itself.
I adapted the WIP and attached a version which let me build with sandboxing enabled in ESR52. Now, we just need to get it work. :)
I am still waiting of Jacek's but it seems to me the two obvious blockers are SEH support and getting that assembly code in SmartSidestepResolverThunk::SmartStub() ported. Not sure what to do about the assembly but https://gcc.gnu.org/wiki/WindowsGCCImprovements mentions Casper Hornstrup having created an initial implementation that did not make it into GCC mainline. Code not being in GCC mainline is no issue for us in general, so maybe we should try to dig that code up and see whether we can get it to work with GCC 5? Or even better getting Casper to make it work?
/home/firefox/win52/gecko-dev/security/sandbox/chromium/sandbox/win/src/restricted_token_utils.cc:61:32: error: ‘WinLocalAccountAndAdministratorSid’ was not declared in this scope deny_only_sids.push_back(WinLocalAccountAndAdministratorSid);
I'm pretty sure we cannot. try {} except {} can be replaced with setjmp/longjmp but __try / __except are a special MSVC extension that catches what would otherwise be a segfault.
Right now we're looking at a few options:
Rip out all __try / __except and just hope we don't hit an access violation in normal usage