ELF interpretor info: align and add random padding
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | binfmt/elf: use functions for stack manipulationfs/ | +50 | 0 replies | |
| 2/3 | binfmt/elf: align AT_RANDOM arrayfs/ | +8 | 0 replies | |
| 3/3 | binfmt/elf: randomize padding between ELF interp infofs/ | +30 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] ELF interpretor info: align and add random padding
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(-)
Signature · 1 line
2.21.0