by schoen · 2y ago · 0 comments
https://en.wikipedia.org/wiki/Control-flow_integrity
I guess (although it doesn't specifically say) that this is making use of Intel's CET feature?
https://en.wikipedia.org/wiki/Return-oriented_programming#Br...
That page has a reasonable summary of the exploitation techniques and history motivating this work.
BTW. A similar extension is also about to be approved for RISC-V: "Zicfilp". It also repurposes an instruction that was previously a NOP.
So, ROP itself is a (frequently very effective) workaround for W^X memory protection features, where executable code itself should be unmodifiable at runtime. I wonder if there's a "next" CFI attack that calls existing functions that are actually defined as such, but in a weird order, or with weird arguments.
The ability to do that effectively would depend on lots of stuff, including the calling convention (as the stack or heap are easier to corrupt than registers).
Maybe someone is already writing an advanced ROP gadget-search that looks for "real functions that can be combined to make ROP gadgets by calling them in a bizarre way". (This is already much less likely to occur in a real program ... I think ...! But maybe the return-to-libc phenomenon is still a rich source of vulnerability?)