artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6dde1e4
)
Error out if the PT_INTERP segment isn't NUL terminated
author
guenther
<guenther@openbsd.org>
Thu, 30 Apr 2015 03:11:21 +0000
(
03:11
+0000)
committer
guenther
<guenther@openbsd.org>
Thu, 30 Apr 2015 03:11:21 +0000
(
03:11
+0000)
ok deraadt@ millert@ miod@
sys/kern/exec_elf.c
patch
|
blob
|
history
diff --git
a/sys/kern/exec_elf.c
b/sys/kern/exec_elf.c
index
f8bfefe
..
76fd2d2
100644
(file)
--- a/
sys/kern/exec_elf.c
+++ b/
sys/kern/exec_elf.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: exec_elf.c,v 1.11
4 2015/04/26 05:30:42
guenther Exp $ */
+/* $OpenBSD: exec_elf.c,v 1.11
5 2015/04/30 03:11:21
guenther Exp $ */
/*
* Copyright (c) 1996 Per Fogelstrom
@@
-559,6
+559,8
@@
ELFNAME2(exec,makecmds)(struct proc *p, struct exec_package *epp)
pp->p_offset, interp, pp->p_filesz)) != 0) {
goto bad;
}
+ if (interp[pp->p_filesz - 1] != '\0')
+ goto bad;
} else if (pp->p_type == PT_LOAD) {
if (pp->p_filesz > pp->p_memsz) {
error = EINVAL;