linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* binfmt_elf: use ELF_ET_DYN_BASE only for PIE breaks asan
@ 2017-08-07 17:24 Dmitry Vyukov
  2017-08-07 17:33 ` Kostya Serebryany
                   ` (2 more replies)
  0 siblings, 3 replies; 32+ messages in thread
From: Dmitry Vyukov @ 2017-08-07 17:24 UTC (permalink / raw)
  To: Kees Cook, danielmicay, Michal Hocko, Andrew Morton,
	linux-mm@kvack.org, Rik van Riel
  Cc: Kostya Serebryany, Reid Kleckner, Peter Collingbourne

Hello,

The recent "binfmt_elf: use ELF_ET_DYN_BASE only for PIE" patch:
https://github.com/torvalds/linux/commit/eab09532d40090698b05a07c1c87f39fdbc5fab5
breaks user-space AddressSanitizer. AddressSanitizer makes assumptions
about address space layout for substantial performance gains. There
are multiple people complaining about this already:
https://github.com/google/sanitizers/issues/837
https://twitter.com/kayseesee/status/894594085608013825
https://bugzilla.kernel.org/show_bug.cgi?id=196537
AddressSanitizer maps shadow memory at [0x00007fff7000-0x10007fff7fff]
expecting that non-pie binaries will be below 2GB and pie
binaries/modules will be at 0x55 or 0x7f. This is not the first time
kernel address space shuffling breaks sanitizers. The last one was the
move to 0x55.

Is it possible to make this change less aggressive and keep the
executable under 2GB?

In future please be mindful of user-space sanitizers and talk to
address-sanitizer@googlegroups.com before shuffling address space.

Thanks

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2017-08-07 19:46 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-07 17:24 binfmt_elf: use ELF_ET_DYN_BASE only for PIE breaks asan Dmitry Vyukov
2017-08-07 17:33 ` Kostya Serebryany
2017-08-07 17:33 ` Kees Cook
2017-08-07 18:26   ` Kostya Serebryany
2017-08-07 18:36     ` Evgenii Stepanov
2017-08-07 18:40       ` Kees Cook
2017-08-07 18:51         ` Evgenii Stepanov
2017-08-07 18:57           ` Kees Cook
2017-08-07 19:03             ` Kostya Serebryany
2017-08-07 19:06               ` Kees Cook
2017-08-07 19:10                 ` Kostya Serebryany
2017-08-07 19:24               ` Kees Cook
2017-08-07 19:32                 ` Kostya Serebryany
2017-08-07 19:12             ` Evgenii Stepanov
2017-08-07 18:38     ` Daniel Micay
2017-08-07 18:45       ` Daniel Micay
2017-08-07 18:39     ` Kees Cook
2017-08-07 18:48       ` Daniel Micay
2017-08-07 18:52         ` Kees Cook
2017-08-07 18:56           ` Kostya Serebryany
2017-08-07 18:59             ` Kees Cook
2017-08-07 19:01               ` Daniel Micay
2017-08-07 19:05               ` Kostya Serebryany
2017-08-07 19:12                 ` Kees Cook
2017-08-07 19:16                   ` Kostya Serebryany
2017-08-07 19:21                     ` Kees Cook
2017-08-07 19:26                       ` Kostya Serebryany
2017-08-07 19:34                         ` Kees Cook
2017-08-07 19:40                           ` Kostya Serebryany
2017-08-07 19:42                             ` Daniel Micay
2017-08-07 19:46                             ` Kees Cook
2017-08-07 18:21 ` Daniel Micay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).