← Back to team overview

kernel-packages team mailing list archive

[Bug 1302245] [NEW] mmap_min_addr blocks armhf binary support on arm64

 

Public bug reported:

As of linux 3.13.0_22.44, unprivileged armhf binaries will not run on a default arm64 Ubuntu install on hardware that supports ARMv7 instructions:
  
$ LD_LIBRARY_PATH=/home/dannf/armhf/lib:/home/dannf/armhf/lib/arm-linux-gnueabihf /home/dannf/armhf/lib/ld-linux-armhf.so.3 /home/dannf/armhf/bin/true
/home/dannf/armhf/bin/true: error while loading shared libraries: /home/dannf/armhf/bin/true: failed to map segment from shared object: Operation not permitted

This appears to be because we set CONFIG_DEFAULT_MMAP_MIN_ADDR to 65536.
If we lower this to 32768, these binaries work:

$ echo 32768 | sudo tee /proc/sys/vm/mmap_min_addr
32768
$ LD_LIBRARY_PATH=/home/dannf/armhf/lib:/home/dannf/armhf/lib/arm-linux-gnueabihf /home/dannf/armhf/lib/ld-linux-armhf.so.3 /home/dannf/armhf/bin/true
$ echo $?
0

Of course, lowering this default has some security implications - and it
isn't clear how generally useful it is to have armhf compatibility
support on arm64 systems.

** Affects: linux (Ubuntu)
     Importance: Undecided
         Status: Incomplete


** Tags: arm64 hs-arm64

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1302245

Title:
  mmap_min_addr blocks armhf binary support on arm64

Status in “linux” package in Ubuntu:
  Incomplete

Bug description:
  As of linux 3.13.0_22.44, unprivileged armhf binaries will not run on a default arm64 Ubuntu install on hardware that supports ARMv7 instructions:
    
  $ LD_LIBRARY_PATH=/home/dannf/armhf/lib:/home/dannf/armhf/lib/arm-linux-gnueabihf /home/dannf/armhf/lib/ld-linux-armhf.so.3 /home/dannf/armhf/bin/true
  /home/dannf/armhf/bin/true: error while loading shared libraries: /home/dannf/armhf/bin/true: failed to map segment from shared object: Operation not permitted

  This appears to be because we set CONFIG_DEFAULT_MMAP_MIN_ADDR to
  65536. If we lower this to 32768, these binaries work:

  $ echo 32768 | sudo tee /proc/sys/vm/mmap_min_addr
  32768
  $ LD_LIBRARY_PATH=/home/dannf/armhf/lib:/home/dannf/armhf/lib/arm-linux-gnueabihf /home/dannf/armhf/lib/ld-linux-armhf.so.3 /home/dannf/armhf/bin/true
  $ echo $?
  0

  Of course, lowering this default has some security implications - and
  it isn't clear how generally useful it is to have armhf compatibility
  support on arm64 systems.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1302245/+subscriptions


Follow ups

References