diff options
| author | 2000-11-06 16:19:52 +0000 | |
|---|---|---|
| committer | 2000-11-06 16:19:52 +0000 | |
| commit | 41769dfb22565e89ee2caf64629ffac138bb02cb (patch) | |
| tree | 9acf352ad20830e4fe25c7e88eec8c0c0937eb23 /sys/kern/exec_subr.c | |
| parent | MLINK uhub.4 (diff) | |
| download | wireguard-openbsd-41769dfb22565e89ee2caf64629ffac138bb02cb.tar.xz wireguard-openbsd-41769dfb22565e89ee2caf64629ffac138bb02cb.zip | |
Don't bomb when the length of pagedvn vm_cmd is not page aligned.
Other commands were checked and look safe.
Diffstat (limited to 'sys/kern/exec_subr.c')
| -rw-r--r-- | sys/kern/exec_subr.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/exec_subr.c b/sys/kern/exec_subr.c index 0829a80746e..36b2f4b13ea 100644 --- a/sys/kern/exec_subr.c +++ b/sys/kern/exec_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_subr.c,v 1.8 2000/09/26 14:01:39 art Exp $ */ +/* $OpenBSD: exec_subr.c,v 1.9 2000/11/06 16:19:52 art Exp $ */ /* $NetBSD: exec_subr.c,v 1.9 1994/12/04 03:10:42 mycroft Exp $ */ /* @@ -153,13 +153,14 @@ vmcmd_map_pagedvn(p, cmd) * map the vnode in using uvm_map. */ - /* checks imported from uvm_mmap, needed? */ if (cmd->ev_len == 0) return(0); if (cmd->ev_offset & PAGE_MASK) return(EINVAL); if (cmd->ev_addr & PAGE_MASK) return(EINVAL); + if (cmd->ev_len & PAGE_MASK) + return(EINVAL); /* * first, attach to the object |
