public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] ELF interpretor info: align and add random padding
@ 2019-06-13 11:26 Yann Droneaud
  2019-06-13 11:26 ` [PATCH 1/3] binfmt/elf: use functions for stack manipulation Yann Droneaud
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Yann Droneaud @ 2019-06-13 11:26 UTC (permalink / raw)
  To: linux-kernel, kernel-hardening
  Cc: Andrew Morton, Kees Cook, Alexey Dobriyan, Yann Droneaud

Hi,

The following patches are mostly focused on ensuring AT_RANDOM array is
aligned on 16bytes boundary, and while being located at a pseudo-random
offset on stack (at most 256 bytes).

This patchset also insert a random sized (at most 15 bytes) padding between
AT_RANDOM and AT_PLATFORM and/or AT_BASE_PLATFORM.

It also insert a random sized padding (at most 256 bytes) between those
data and the arrays passed to userspace (argv[] + environ[] + auxv[])
as defined by ABI.

Adding random padding around AT_RANDOM, AT_PLATFORM, AT_BASE_PLATEFORM
should be viewed as an exercise of cargo-cult security as I'm not aware
of any attack that can be prevented with this mechanism in place.

Regards.

Yann Droneaud (3):
  binfmt/elf: use functions for stack manipulation
  binfmt/elf: align AT_RANDOM array
  binfmt/elf: randomize padding between ELF interp info

 fs/binfmt_elf.c | 110 +++++++++++++++++++++++++++++++++++++-----------
 1 file changed, 86 insertions(+), 24 deletions(-)

-- 
2.21.0


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

end of thread, other threads:[~2019-06-13 15:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-13 11:26 [PATCH 0/3] ELF interpretor info: align and add random padding Yann Droneaud
2019-06-13 11:26 ` [PATCH 1/3] binfmt/elf: use functions for stack manipulation Yann Droneaud
2019-06-13 11:26 ` [PATCH 2/3] binfmt/elf: align AT_RANDOM array Yann Droneaud
2019-06-13 11:26 ` [PATCH 3/3] binfmt/elf: randomize padding between ELF interp info Yann Droneaud
2019-06-13 13:39 ` [PATCH 4/3] binfmt/elf: don't expose prandom_u32() state Yann Droneaud

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