48 points · by lucasRW · 1y ago · 33 comments
This didn't pass the sniff test for me - this doesn't do anything to protect existing RWX regions, and a theoretical attacker that has the ability to inject arbitrary DLLs into the browser process already has access far beyond what the browser could protect.
Fortunately, because the browser in question (Firefox) is open source, we can find the change that added this code. This is a bit of a pain because the file has been renamed twice, but here it is: https://hg.mozilla.org/mozilla-central/rev/7d2e74c69253e57fd...
And if we read the associated bug (https://bugzilla.mozilla.org/show_bug.cgi?id=1322554) we can see this is described as "policy decision", and this entire section of the code isn't exploit mitigation, but rather intended to block broken third party programs from injecting their buggy and poorly written DLLs into Firefox and causing bugs that users report to Mozilla.
Indeed -- in fact, I was tech lead for an entire project dedicated to dealing with this situation (InjectEject).
tig [0] cane make this a breeze to inspect. It'll give you history following file moves (assuming git knows about them):
tig file
tig: https://jonas.github.io/tig/[0]: https://news.ycombinator.com/item?id=42636362 [1]: https://news.ycombinator.com/item?id=42630520
Curious, anyone else want to name the browser?
I'd assumed it would be Edge since the author was crawling through decompiled output and worrying about litigiousness, but the above code in a BaseThreadInitThunk() interceptor matches what the author is describing.
https://searchfox.org/mozilla-central/source/toolkit/xre/dll...
Indiscriminate blocking of any DLL in the world with 12/6 hex digit filenames.
It must be hard to be in a position to be blamed for someone else's bad code - or even malware - one comment said it was 1/3 of the total crashes on Vista at the time.
As a GPU driver dev I 100% understand this position - no user cares that gamedevs are hacking things left and right, they care if it runs.
https://searchfox.org/mozilla-central/source/toolkit/xre/dll...