Arbitrary RW means I can have a callchain that goes from C++FuncA -> JITedCodeB -> C++FuncC, and I can then make the JIT engine garbage-collect JITedCodeB and put different code there. Not violating any CFI constraints, but executing arbitrary code.
3
6
1
24
In short: CFI is bunk in an environment with a JIT that ever reuses +x address space.
3
1
7
Oh cool. You are right. I haven't thought about that attack. Thanks! :)
2
1
51%+ of credit for this needs to go to @ifsecure
1
1
Ah no, the return-after-free (as I like to call it) idea was entirely your own. My sole contribution was to drag you into a meeting.
1
2
I remember this being very much developed in ping-pong, so I will continue to attribute 51% to you :)
1
4
@grsecurity ROP attacks return flow. So saying that there is no effective mitigation against ROP might not be entirely wrong by Intel. CET shadow stack does address ROP in fine grained manner and deterministically. And assume arbitrary read/write primitive in attacker hands. /1
2
@grsecurity In your analysis you mentioned that attacker can use RELRO pages and perform writes to manufacture RO but dirty (thus shadow stack) pages. CET prevents that by faulting ; CR0.WP can't be cleared if CR4.CET = 1. Setting CR4.CET while CR0.WP=0 will fault. /2
3
And not saying above prevention is not coming at cost (like hotpatching, link pasted). It'll break things but eventually it'll improve. lists.xenproject.org/archive…
2
In your analysis against CET you assume arbitrary Read writes. But for RAP you propose prevention against read primitives rather than assuming read primitives are available (like CET does). Why so? /4
3
RAP has not 1 *but* 2 features that deal with the return address. one's type hash based (less precise but impervious to read/write bugs) and the other is the xor cookie (precise but vulnerable to read bugs). combined, they're the strongest defense we know of.

Jun 17, 2020 · 8:23 PM UTC