diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2017-03-20 00:05:22 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2017-03-20 00:05:22 +0000 |
commit | cedf4bf7d753aa34dff6d9b9eccc85074c49215d (patch) | |
tree | 819896e8d7447629f9427738d8867d82592bb37f | |
parent | dd6a39814dc89821a59d6c8dbf98e5ba880b437b (diff) |
Initialize the stack buffer used to build the auxiliary vector to zero to
avoid leaking the contents of the kernel stack into userspace.
ok guenther@, deraadt@
-rw-r--r-- | sys/kern/exec_elf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/exec_elf.c b/sys/kern/exec_elf.c index 643a2165885..8ab7a0ebd50 100644 --- a/sys/kern/exec_elf.c +++ b/sys/kern/exec_elf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_elf.c,v 1.139 2017/03/05 00:45:30 guenther Exp $ */ +/* $OpenBSD: exec_elf.c,v 1.140 2017/03/20 00:05:21 kettenis Exp $ */ /* * Copyright (c) 1996 Per Fogelstrom @@ -802,6 +802,7 @@ exec_elf_fixup(struct proc *p, struct exec_package *epp) * linked binaries */ if (error == 0) { + memset(&ai, 0, sizeof ai); a = ai; a->au_id = AUX_phdr; |