5 ms·
W^X enabled in OpenBSD Firefox port
- halosghost 11y agoI would love to see this make it upstream. I use PaX/grsec under linux and one of my favorite things about them is that they try to enforce w^x. Unfortunately, a ton of programs break this policy (seemingly for no benefit). Having upstream firefox respect w^x anyway would mean I could remove its exception under PaX and a whole class of possible security flaws just GoAway™. Ideally, I'd love to see Linux embrace w^x generally, but the kernel devs do not seem terribly interested in that. Either way, keep up the rockin' work OpenBSD team! Edit: Oh wait! The patch for this is actually upstream! This bit of news is OpenBSD enabling it! That's awesome! /me tries to rebuild firefox with the patch enabled.
- eugeneionesco 11y ago>and a whole class of possible security flaws just GoAway™. Technically not true, they don't go away, they're just harder(and not that much harder) to exploit.
- Dylan16807 11y agoI think you're using overly vague classes if you can't point to classes of attack that are flat-out blocked.
- brandmeyer 11y agoIt changes a broad class of attack exploits to require return-oriented programming techniques to exploit. Are you seriously claiming that ROP isn't "that much harder" than injecting arbitrary code?
- jcranmer 11y agolibc by itself provides a Turing-complete set of ROP gadgets: <http://www.cs.ncsu.edu/faculty/jiang/pubs/RAID11.pdf> http://www.cs.ncsu.edu/faculty/jiang/pubs/RAID11.pdf>.
- halosghost 11y agoFirst of all: thanks! I'm excited to read this! Second of all: ugh! Dear HackerNews team, please fix your URL matching algorithm so it doesn't include <> in URLs; they're actually explicitly recommended by the URI RFC as delimiters. Sincerely, halosghost
- rockdoe 11y agoHere's the original paper of this attack (AFAIK): http://cseweb.ucsd.edu/~hovav/dist/geometry.pdf http://cseweb.ucsd.edu/~hovav/dist/geometry.pdf The other paper shows that this technique is Turing complete. But yes, basically W^X is defeated.
- eugeneionesco 11y ago>Are you seriously claiming that ROP isn't "that much harder" than injecting arbitrary code? Yes I am.
- dertext 11y agoTry running Gentoo hardened. It makes it a lot easier to run on Grsec and Pax kernel.
- halosghost 11y agoActually, though I deeply enjoy grsec and pax, I find it to work just fine with Arch. I have definitely considered gentoo hardened though; the notion of being able to rebuild everything exactly how I'd like it is pretty damn tempting. Thank you for the recommendation; everytime someone gives me a serious recommendation for Gentoo, I always have to take a moment and give it a more serious thought :)
- anonbanker 11y agoseconding the gentoo recommendation. PaX/grsec is far easier under OpenRC.
- kbenson 11y agoI was going to post something about how I wonder how useful this is since my understanding is that JIT engines need to be able to write executable code to memory, and if you can't protect that, which seems to be the largest attack vector for browsers currently. Then I actually looked at the post, and it's about enabling W^X on JIT pages in memory. Very cool.
- dbolgheroni 11y agoYou can check the end of this talk, when someone asks about this: https://events.yandex.com/events/ruBSD/2013/talks/103/ https://events.yandex.com/events/ruBSD/2013/talks/103/ I would recommend, however, watch from the beginning.
- simcop2387 11y agoI think I remember reading old articles about how they're doing this. Once the code has been JIT'd they put it on a page (or pages) by itself, and then toggle the write bit so it can be executed. Once it's JIT'd anyway it won't ever be changed, other than to maybe be dropped in favor of some other code. This still can have some security issues if someone can manage to get the JIT engine to output arbitrary code directly but it prevents a huge class of attacks of overwriting the JIT pages and getting the browser to then execute them. Or the usual stack overflows and other things of course.
- jdub 11y agoWouldn't it potentially waste a bunch of memory, or does JIT output tend to be greater than a 4K page?
- klodolph 11y agoAn individual function would often be smaller than 4K, and it's up to the JIT to decide how much to compile at one time, and you can also coalesce new code with old code to compact it.
- the8472 11y ago
- deleted 11y ago[deleted]
- st3fan 11y agoFirefox on iOS, eh?
- TD-Linux 11y agoIt's buildable and works, but you obviously could never submit it to the App Store.
- CraftThatBlock 11y agoFirefox on iOS https://appsto.re/ca/-LZ_6.i https://appsto.re/ca/-LZ_6.i
- captainmuon 11y agoThat one uses WebKit. I wonder if anybody actually got Gecko to run on iOS. As I understand, there are "only" two problems - Apple not allowing other HTML/JS implementations, and Apple not allowing writable, executable memory. I don't know what the status of the first is, but you can get around the latter by just using an interpreter instead of a JIT (which is of course terribly slow). Or, you decide Apple is never going to let your engine on the App store, and then you just include the JIT. The enforcement is done at time of submission to the app store, not at runtime. IIRC, you can just call a certain function to mark a memory region as writable or executable, but Apple detects this call statically. I further wonder if you could just distribute binaries, outside of the app store, and your users would have $99 developer accounts, and run a little script to "build their project with XCode", signing and installing it to their device?
- cpeterso 11y agoPrototype builds of Gecko running on iOS do exist, but they are not officially developed or maintained by Mozilla. You can track the progress of merging iOS support into the main Firefox repository in this bug: https://bugzil.la/1163827 https://bugzil.la/1163827
- 11y ago