vmm: Fix use-after-free in load_elf()
authorBarret Rhoden <brho@cs.berkeley.edu>
Tue, 6 Jun 2017 19:45:57 +0000 (15:45 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Tue, 6 Jun 2017 19:48:12 +0000 (15:48 -0400)
commitcab0d41e2c004dbd0ef762d8f002ce8ea6212308
tree46c8555694cceb17f9f0a971146b5fddddaf4e08
parent30240891d191723524f0a43e000f99dff31e07b0
vmm: Fix use-after-free in load_elf()

elf_end() frees various structures, so you can't access ehdr anymore.  This
was caught by electric fence.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
user/vmm/load_elf.c