HomeFreeBSD

elf image activator: convert asserts into errors

Description

elf image activator: convert asserts into errors

Invalid (artificial) layout of the loadable ELF segments might result in
triggering the assertion. This means that the file should not be
executed, regardless of the kernel debug mode. Change calling
conventions for rnd_elf{32,64} helpers to allow returning an error, and
abort activation with ENOEXEC if its invariants are broken.

Reported and tested by: pho
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D33359

Details

Provenance
kibAuthored on Dec 7 2021, 9:29 AM
Reviewer
markj
Differential Revision
Restricted Differential Revision
Parents
rGb4b20492cd92: exec_elf: assert that the image vnode is still locked on return
Branches
Unknown
Tags
Unknown