Make sure the ELF header size is not too large. This fixes a potential over
authorDavid Rhodus <drhodus@dragonflybsd.org>
Mon, 29 Mar 2004 17:17:09 +0000 (17:17 +0000)
committerDavid Rhodus <drhodus@dragonflybsd.org>
Mon, 29 Mar 2004 17:17:09 +0000 (17:17 +0000)
commit2cc7c57968b2555a2197308b3a55ecd6b4ddb555
treeddd0197b9c28ba1f91c3fc8dd74c3f318f7178f1
parentffaa7d78bb7f0b72b5c2c7a049603777d2674ff4
Make sure the ELF header size is not too large. This fixes a potential over
flow that could happen in a number of places. In DragonFly we rely that the
ELF header will be in the first page. Though the ABI specification does not
require this it is always true in practice.

Glanced at FreeBSD but found it be incomplete. Possibly more bounds
checking is needed for other things here, though futher investigation is
needed first.
sys/kern/imgact_elf.c