Re:Why Heartbleed doesn't leak the private key [retracted]
by makomk on Wednesday April 09, 2014 @05:03PM
(#7562372)
Exactly, this fails to understand a fairly fundamental aspect of the attack: you can read past the end of the buffer. Looking at the OpenSSL code, it appears the size of the buffer you're reading from is 16KiB+a few hundred bytes. (I could be wrong - not 100% sure I've followed the code correctly - but it's not going to be larger than that for various reasons.) You can read up to 64KiB-1 bytes from it.
Re:Why Heartbleed doesn't leak the private key [retracted]
by webjprgm on Wednesday April 09, 2014 @04:13PM
(#7562021)
Stack is traditionally accessible too. So you mean global/static memory? What languages would let you edit that? Can you get a pointer to it in C and change things, or is it stored in protected memory blocks with the program text?
You seem to suggest that the snapshot of the heap gets not just freed sections of the heap but the whole heap? If so then my other idea is invalidated (allocate on the heap a chunk of memory large enough for the keys and never free it, just re-use it when needed).
Re:Why Heartbleed doesn't leak the private key [retracted]
by danielweber on Wednesday April 09, 2014 @08:12PM
(#7563423)
While I was testing on a server and out of a few hundred dumps never got any two with any common byte strings of more than 4 bytes among them.
How this bug actually ends up dumping information really depends a lot on luck.
it might be interesting to consider storing keys out of the heap