All sorts of places in the ELF loading code assume that filesz <=
memsz, so check that explicitly up front. The kernel already performs
this check for the PT_LOAD segments in the main binary and rtld in
imgact_elf.c.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 75276 Build 72159: arc lint + arc unit
Event Timeline
Comment Actions
I do not object, but I also note that rtld trusts the format of the objects to be correct. There is a lot of missed bounds checks.