problem with PIE binaries and kernels <= 3.19
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
bash (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Vivid |
Won't Fix
|
Medium
|
Unassigned | ||
linux (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Vivid |
Fix Released
|
High
|
Tim Gardner |
Bug Description
When bash is built as a Position Independent Executable (PIE), it very sporadically crashes due to some issue with memory layout in kernels before 4.2. I'm currently testing enabling PIE by default in gcc on amd64 for xenial, and some of my builds (e.g. cpio) are failing in the buildds with the following message emitted:
bash: xmalloc: .././locale.c:81: cannot allocate 2 bytes (0 bytes allocated)
when the bash that is used is built as PIE. I have seen these failures on buildds where the host is running 3.13 and 3.19. I am also able to reproduce this locally on a machine running trusty with the stock trusty kernel. However, when I boot that same machine with the linux-lts-wily (4.2) kernel and retry the build with everything else exactly the same, the failure disappears.
I discussed this a bit with Kees Cook, and he noted that some cleanups to the kernel's ASLR code happened in 4.1. Specifically, he noted:
commit a87938b2e246b81
Author: Michael Davidson <email address hidden>
fs/
However, that landed in stable and has been picked up in our kernels as 668965be56ea0b2
Kees also pointed out that he landed a series of patches from 204db6ed1774300
commit d1fd836dcf00d20
Author: Kees Cook <email address hidden>
mm: split ET_DYN ASLR from mmap ASLR
Other fixes that I see to fs/binfmt_elf.c and arch/x86/mm/mmap.c look like they either occurred only in 4.3 or have already been backported via the stable kernels.
I should also point out that these cleanups may address some of the ASLR failed tests that occur on non-x86 architectures for pre 4.2 kernels.
I am happy to test out kernels to try to address this. Thanks.
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: linux-image-
ProcVersionSign
Uname: Linux 3.13.0-68-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.18
Architecture: amd64
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/dsp', '/dev/snd/by-path', '/dev/snd/
Date: Fri Nov 20 13:58:40 2015
HibernationDevice: RESUME=
IwConfig:
eth0 no wireless extensions.
lo no wireless extensions.
MachineType: Shuttle Inc SG33
ProcEnviron:
SHELL=/bin/bash
TERM=screen
PATH=(custom, user)
LANG=en_US.UTF-8
XDG_RUNTIME_
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=
RelatedPackageV
linux-
linux-
linux-firmware 1.127.18
RfKill:
SourcePackage: linux
StagingDrivers: zram
UpgradeStatus: Upgraded to trusty on 2014-04-16 (583 days ago)
WpaSupplicantLog:
dmi.bios.date: 11/28/2007
dmi.bios.vendor: Phoenix Technologies, LTD
dmi.bios.version: 6.00 PG
dmi.board.name: FG33
dmi.board.vendor: Shuttle Inc
dmi.board.version: V10
dmi.chassis.type: 3
dmi.chassis.vendor: Shuttle Inc
dmi.chassis.
dmi.modalias: dmi:bvnPhoenixT
dmi.product.name: SG33
dmi.product.
dmi.sys.vendor: Shuttle Inc
CVE References
Changed in linux (Ubuntu): | |
status: | Confirmed → Fix Released |
Changed in linux (Ubuntu Vivid): | |
assignee: | nobody → Tim Gardner (timg-tpi) |
status: | New → In Progress |
Changed in linux (Ubuntu Vivid): | |
status: | In Progress → Fix Committed |
Changed in linux (Ubuntu Vivid): | |
importance: | Undecided → High |
Changed in linux (Ubuntu): | |
importance: | Undecided → High |
Changed in bash (Ubuntu Vivid): | |
status: | Invalid → Won't Fix |
importance: | Undecided → Medium |
Changed in bash (Ubuntu): | |
importance: | Undecided → Medium |
This change was made by a bot.