Can somebody explain to me, what's up with tor-browser-hardened and Grsecurity? I can't launch hardened browser on Grsecurity hardened kernel. Even after applying paxctl -cpemrxs to Browser/firefox and Browser/TorBrowser/Tor/tor executables.

start-tor-browser --verbose says the following:

==5223==Shadow memory range interleaves with an existing memory mapping. ASan cannot proceed correctly. ABORTING.


Correct, PaX does not play well with the allocation method that is used by ASAN. Infact, other of the sanitizers are known to cause other problems.

From this gentoo bug report:

PaX hard limits the maximum virtual memory size of a task in security/Kconfig:

...ASAN needs only 2 TB, but it needs them at a very specific address (to mirror the addresses used by the programm in the lower 2 TB of the address space), so at least 8 TB address space is needed to fit all the mappings at their expected addresses.

As such, when ASAN tries to allocate a large range of Virtual Memory for it's Shadow Memory, even while not using the majority of it, it will fail.

The gentoo bug report comes with some proposed fixes, as does this blog post. No amount of extra PaX flags will allow it to work, it has been known to be incompatible for some years. I'd suggest entrusting PaX over ASAN to protect you from exploitation. While ASAN is good for detecting bugs and memory corruption, which is invaluable for developers of large code bases like Firefox, it is not (primarily) designed to prevent exploitation.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.