Skip to content

Extend user-space ASLR range

Ben Hutchings cip-dev 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6mm: mmap: add new /proc tunable for mmap_base ASLRDocumentation/sysctl/vm.txt arch/Kconfig include/linux/mm.h +2 more+142 -00 replies
2/6arm: mm: support ARCH_MMAP_RND_BITSarch/arm/Kconfig arch/arm/mm/mmap.c+10 -20 replies
3/6arm64: mm: support ARCH_MMAP_RND_BITSarch/arm64/Kconfig arch/arm64/mm/mmap.c+35 -20 replies
4/6x86: mm: support ARCH_MMAP_RND_BITSarch/x86/Kconfig arch/x86/mm/mmap.c+22 -60 replies
5/6drivers: char: random: add get_random_long()drivers/char/random.c include/linux/random.h+23 -00 replies
6/6mm: ASLR: use get_random_long()arch/arm/mm/mmap.c arch/arm64/mm/mmap.c arch/mips/mm/mmap.c +5 more+14 -140 replies

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by.

PatchKees Cook
1/6A-b
2/6A-b
3/6A-b
4/6A-b
5/6A-b
6/6A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [cip-dev] [PATCH 4.4-cip 0/6] Extend user-space ASLR range

This is a backport of changes in 4.5 to extend the range of Address Space Layout Randomisation for user-space processes. When enabled, this should make some user-space vulnerabilities harder to exploit, but it can also cause some applications to fail if they currently use a large proportion of the virtual address space.

The default ASLR range remains the same, but it can be changed through kernel config (CONFIG_ARCH_MMAP_RND_BITS) or at run-time through sysctl (vm.mmap_rnd_bits). (For 32-bit compat tasks, the range is controlled through CONFIG_ARCH_MMAP_RND_COMPAT_BITS and vm.mmap_rnd_compat_bits.)

This includes support for arm, arm64 and x86 (32- and 64-bit). (arm64 is not currently supported by CIP, but it was easier to include it in the backport than to leave it out.)

For this and other backports, I'm looking for feedback like:
- Did I miss a follow-up fix or an earlier dependency?
- Does this cause a regression (other than as explained above)?
- Are you likely to use it?
- Are there related features you want in 4.4?

Ben.

Daniel Cashman (6):
mm: mmap: add new /proc tunable for mmap_base ASLR
arm: mm: support ARCH_MMAP_RND_BITS
arm64: mm: support ARCH_MMAP_RND_BITS
x86: mm: support ARCH_MMAP_RND_BITS
drivers: char: random: add get_random_long()
mm: ASLR: use get_random_long()

 Documentation/sysctl/vm.txt      | 29 +++++++++++++++++
 arch/Kconfig                     | 68 ++++++++++++++++++++++++++++++++++++++++
 arch/arm/Kconfig                 |  9 ++++++
 arch/arm/mm/mmap.c               |  3 +-
 arch/arm64/Kconfig               | 29 +++++++++++++++++
 arch/arm64/mm/mmap.c             |  8 +++--
 arch/mips/mm/mmap.c              |  4 +--
 arch/powerpc/kernel/process.c    |  4 +--
 arch/powerpc/mm/mmap.c           |  4 +--
 arch/sparc/kernel/sys_sparc_64.c |  2 +-
 arch/x86/Kconfig                 | 16 ++++++++++
 arch/x86/mm/mmap.c               | 12 +++----
 drivers/char/random.c            | 22 +++++++++++++
 fs/binfmt_elf.c                  |  2 +-
 include/linux/mm.h               | 11 +++++++
 include/linux/random.h           |  1 +
 kernel/sysctl.c                  | 22 +++++++++++++
 mm/mmap.c                        | 12 +++++++
 18 files changed, 240 insertions(+), 18 deletions(-)
Signature · 6 lines
2.10.2


-- 
Ben Hutchings
Software Developer, Codethink Ltd.