This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: i386/prologues: ROP mitigation for normal function epilogues


On 06/17/2016 04:03 PM, Michael Matz wrote:
But does this really improve something?  Essentially you're replacing

  <random bytes1> 0xc9 0xc3 <random bytes2>

(the end of a function containing "leave;ret") with

  <random bytes1> 0xe9 <four random bytes> <random bytes2>

where the four random bytes are different for each rewritten function
return (but correlated as they differ exactly by their position
difference).

I'm not sure why the latter sequence is better?

I think I'm missing what you're trying to say. The latter sequence does not contain a return opcode hence it ought to be better?


Bernd


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]