[PATCH] Generate additional secret keys for the heap protector
Florian Weimer
fweimer@redhat.com
Fri Oct 28 15:39:00 GMT 2016
On 10/28/2016 04:46 PM, Carlos O'Donell wrote:
> Florian,
>
> Awesome patch. This is looking really good and the expansion of entropy
> into the keys using sha256 looks great.
>
> OK to checkin if you:
>
> * Fix spelling.
> * Remove _dl_setup_pointer_guard linux+generic implementation as unused.
> * Remove _dl_setup_stack_chk_guard linux+generic implementation as unused
New version attached. I'm waiting until the libcrypt fix is checked in
(I'll try to test on SPARC and commit if successful). And it only makes
sense to have this change if we end up with the heap protector, so I'll
wait for that, too.
> Non-blocking questions:
>
> Does the sha256 code add about 10kb to the loader's size? A fair trade-off
> for being able to correctly expand the randomness we have into the size we
> need. I also think the startup cost has to be paid, particularly for the
> benefit of hardening the malloc headers against any many of the previously
> used overflow attacks.
Before:
-rwxrwxr-x. 1 fweimer fweimer 1231576 Oct 28 17:17 elf/ld.so
text data bss dec hex filename
141373 5092 424 146889 23dc9 elf/ld.so
After:
-rwxrwxr-x. 1 fweimer fweimer 1245552 Oct 28 17:15 elf/ld.so
text data bss dec hex filename
143629 5092 424 149145 24699 elf/ld.so
So it's a 2256 bytes increase in text size. The disk size increase is
mostly debugging information (it's down to 4096 bytes without debugging
information).
I have not tried to measure the cycle impact.
Thanks,
Florian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: keys.patch
Type: text/x-patch
Size: 11088 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20161028/d7d557fe/attachment.bin>
More information about the Libc-alpha
mailing list