mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* new ELF marking
@ 2017-08-09 17:07 Kees Cook
  2017-08-09 17:16 ` H.J. Lu
  0 siblings, 1 reply; 9+ messages in thread
From: Kees Cook @ 2017-08-09 17:07 UTC (permalink / raw)
  To: LKML, binutils

Hi,

I'd like to be able to mark an ELF binary in such a way that Linux's
binfmt_elf.c will collapse a PIE text area into the mmap region
(currently they are separately randomized in memory). This is desired
by AddressSanitizer to avoid having an ASan-built binary have its text
area moving into an unexpected location[1] (ASLR is still desired, but
doesn't need to have a PIE/mmap split).

I see a few ways:

- Add parsing for NOTE program headers and add a new NOTE type
(NT_GNU_EXEC_FLAGS), though notes tend to be strings...

- Add a new Program Header (GNU_EXEC_FLAGS), which is similar to how
GNU_STACK and GNU_RELRO were handled. This could sort of be like NOTE
except just lots of bit flags.

- Use a filesystem xattr. This is fragile, in the case of copying
binaries between systems or filesystems.

Thoughts?

-Kees

[1] https://lkml.org/lkml/2017/8/7/770

-- 
Kees Cook
Pixel Security

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-08-09 22:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-09 17:07 new ELF marking Kees Cook
2017-08-09 17:16 ` H.J. Lu
2017-08-09 18:26   ` Kees Cook
2017-08-09 18:46     ` H.J. Lu
2017-08-09 18:52       ` Kees Cook
2017-08-09 19:01         ` H.J. Lu
2017-08-09 20:32           ` Kostya Serebryany
2017-08-09 21:24             ` H.J. Lu
2017-08-09 22:37               ` Carlos O'Donell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®