From e4c06c55a8034211de02f09d59f89b30561ee580 Mon Sep 17 00:00:00 2001 From: miod Date: Fri, 30 Dec 2005 19:46:53 +0000 Subject: Missing or incorrect header sizes bounds check; ``looks ok'' mickey@ --- sys/compat/linux/linux_exec.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sys/compat/linux/linux_exec.c') diff --git a/sys/compat/linux/linux_exec.c b/sys/compat/linux/linux_exec.c index 7b40114a0ac..b96be60a26b 100644 --- a/sys/compat/linux/linux_exec.c +++ b/sys/compat/linux/linux_exec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: linux_exec.c,v 1.23 2004/04/15 00:22:42 tedu Exp $ */ +/* $OpenBSD: linux_exec.c,v 1.24 2005/12/30 19:46:55 miod Exp $ */ /* $NetBSD: linux_exec.c,v 1.13 1996/04/05 00:01:10 christos Exp $ */ /*- @@ -266,6 +266,9 @@ exec_linux_aout_makecmds(p, epp) int machtype, magic; int error = ENOEXEC; + if (epp->ep_hdrvalid < sizeof(struct exec)) + return (ENOEXEC); + magic = LINUX_N_MAGIC(linux_ep); machtype = LINUX_N_MACHTYPE(linux_ep); -- cgit v1.2.3-59-g8ed1b