programs that lack PT_PHDR are not properly loaded
This is an upstream of https://smartos.org/bugview/OS-4128 from illumos-joyent
Without this, malicious, broken or fuzzed ELF binaries can be misinterpreted and lead to excessive kernel memory consumption.
From the original Joyent ticket:
Apparently, on some conditions (yet to be determined), Linux (or Ubuntu 14.10 or some version of gcc or something else in the toolchain) will generate a binary that lacks the PT_PHDR program header. According to ELF, this is an optional program header, but our binaries have always had it. When this program header is not found, the system annoyingly stops further loading but otherwise returns success -- practically fating the program to die a horrible death in the linker. These binaries are peculiar but they aren't corrupt; we should be able to accommodate them.
Updated by Andy Fiddaman over 1 year ago
- Related to Bug #14236: signed math leads getelfshdr astray added
Updated by Electric Monk over 1 year ago
- Gerrit CR set to 1805
Updated by Electric Monk 9 months ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
git commit 4e18e297380f99d39327599157792494d044942a
commit 4e18e297380f99d39327599157792494d044942a Author: Patrick Mooney <firstname.lastname@example.org> Date: 2022-09-13T19:40:22.000Z 14236 signed math leads getelfshdr astray 14242 programs that lack PT_PHDR are not properly loaded Portions contributed by: Bryan Cantrill <email@example.com> Portions contributed by: Andy Fiddaman <firstname.lastname@example.org> Reviewed by: Robert Mustacchi <email@example.com> Reviewed by: Patrick Mooney <firstname.lastname@example.org> Reviewed by: Andy Fiddaman <email@example.com> Approved by: Rich Lowe <firstname.lastname@example.org>