History log of /openbsd-src/sys/kern/exec_elf.c (Results 76 – 100 of 191)
Revision Date Author Comments
# c0aa15fa 30-Apr-2015 jsg <jsg@openbsd.org>

Now we use p_filesz - 1 to test for NUL check that p_filesz is
at least two and while here allow the upper bound to be
MAXPATHLEN by changing a >= to > as suggested by krw@ in a thread
on tech where

Now we use p_filesz - 1 to test for NUL check that p_filesz is
at least two and while here allow the upper bound to be
MAXPATHLEN by changing a >= to > as suggested by krw@ in a thread
on tech where Maxime Villard proposed additional PT_INTERP checks.

tested by and ok guenther@

show more ...


# 73b029f9 30-Apr-2015 guenther <guenther@openbsd.org>

Error out if the PT_INTERP segment isn't NUL terminated

ok deraadt@ millert@ miod@


# 1fec3ba2 26-Apr-2015 guenther <guenther@openbsd.org>

Require a PT_LOAD segment's p_filesz to be no larger than its p_memsz.

test cases provided by Alejandro Herna'ndez (nitrousenador (at) gmail.com)
ok deraadt@ jsg@


# e0e97bfb 30-Mar-2015 miod <miod@openbsd.org>

Extend uvm_map_hint() to get an address range as extra arguments, and make
sure it will return an address within that range.

Use this in uaddr_rnd_select() to make sure we will not attempt to pick
a

Extend uvm_map_hint() to get an address range as extra arguments, and make
sure it will return an address within that range.

Use this in uaddr_rnd_select() to make sure we will not attempt to pick
an address beyond what we are allowed to map.

In my trees for 9 months, blackmailed s2k15 attendees into agreeing now would
be a good time to commit.

show more ...


# 1fa2698f 10-Feb-2015 guenther <guenther@openbsd.org>

Don't use an uninitialized variable when a PT_LOAD segment with
alignment 0 or 1 is encountered. The result before was just a
spurious failure by execve(), though I had to manually mangle a
binary t

Don't use an uninitialized variable when a PT_LOAD segment with
alignment 0 or 1 is encountered. The result before was just a
spurious failure by execve(), though I had to manually mangle a
binary to hit this case: segments are all long-aligned or better
in practice.

uninitialized variable noted by Maxime Villard (rustyBSD (at) gmx.fr)
ok and prod jsg@

show more ...


# 1a0bd10f 06-Feb-2015 deraadt <deraadt@openbsd.org>

Raise ELF_RANDOMIZE_LIMIT to 64K, so that programs and libraries can
legitimately use random section variables without execve failures...
Because this section is not demand faulted, yield() every pag

Raise ELF_RANDOMIZE_LIMIT to 64K, so that programs and libraries can
legitimately use random section variables without execve failures...
Because this section is not demand faulted, yield() every page during
the fill otherwise the costs are charged poorly.
ok tedu matthew

show more ...


# cc75aa50 27-Jan-2015 kurt <kurt@openbsd.org>

Require EFT shared objects have a PT_PHDR entry to be considered
a pie binary. The kernel will now reject executing a typical shared
library with EINVAL. This breaks compatibility with initial static

Require EFT shared objects have a PT_PHDR entry to be considered
a pie binary. The kernel will now reject executing a typical shared
library with EINVAL. This breaks compatibility with initial static pie
binaries and requires a recent user-land prior to upgrading. In
addition, more fine grained errors can be returned from execve(2)
when errors occur while attempting to execute ELF objects.

okay guenther@, kettenis@, deraadt@

show more ...


# a78264c4 20-Jan-2015 kettenis <kettenis@openbsd.org>

Move ps_strings "after" the random stackgap. This makes its location a
per-process value, and therefpore turns the VM_PSSTRINGS sysctl into a
per-process one as well. This gets rid of a pointer to

Move ps_strings "after" the random stackgap. This makes its location a
per-process value, and therefpore turns the VM_PSSTRINGS sysctl into a
per-process one as well. This gets rid of a pointer to the bottom of the
stack at a fixed location. Also clears the road for unmapping the stackgap.

ok deraadt@

show more ...


# fa471065 22-Dec-2014 kettenis <kettenis@openbsd.org>

Make it possible to execute PIE binaries that don't have an PT_INTERP segment
(and therefore no interpreter). Necessary to make self-relocating "static"
PIE working.

This will also allow execution

Make it possible to execute PIE binaries that don't have an PT_INTERP segment
(and therefore no interpreter). Necessary to make self-relocating "static"
PIE working.

This will also allow execution of shared libraries that have the 'x' bit set.
Those shouldn't exist, but unfortunately people outside OpenBSD think
differently which means third-party software sometimes installs shared
libraries with the 'x' bit set.

ok kurt@, deraadt@

show more ...


# fde894e5 16-Dec-2014 tedu <tedu@openbsd.org>

primary change: move uvm_vnode out of vnode, keeping only a pointer.
objective: vnode.h doesn't include uvm_extern.h anymore.
followup changes: include uvm_extern.h or lock.h where necessary.
ok and

primary change: move uvm_vnode out of vnode, keeping only a pointer.
objective: vnode.h doesn't include uvm_extern.h anymore.
followup changes: include uvm_extern.h or lock.h where necessary.
ok and help from deraadt

show more ...


# 1e8cdc2e 16-Nov-2014 deraadt <deraadt@openbsd.org>

Replace a plethora of historical protection options with just
PROT_NONE, PROT_READ, PROT_WRITE, and PROT_EXEC from mman.h.
PROT_MASK is introduced as the one true way of extracting those bits.
Remove

Replace a plethora of historical protection options with just
PROT_NONE, PROT_READ, PROT_WRITE, and PROT_EXEC from mman.h.
PROT_MASK is introduced as the one true way of extracting those bits.
Remove UVM_ADV_* wrapper, using the standard names.
ok doug guenther kettenis

show more ...


# a11de6bd 14-Nov-2014 tedu <tedu@openbsd.org>

prefer sizeof(*ptr) to sizeof(struct) for malloc and free


# 38782901 06-Nov-2014 tedu <tedu@openbsd.org>

printf debugging worked! figured out the bug (in free()) just after
committing the printfs. revert.


# baec3e9a 06-Nov-2014 millert <millert@openbsd.org>

Make better use of the value of psectionslen instead of recomputing
it multiple times. Also remove an unused variable. OK deraadt@ tedu@


# fd4d8280 06-Nov-2014 tedu <tedu@openbsd.org>

resort to printf debugging hints until we can figure this out. ok deraadt


# 5ff140d2 03-Nov-2014 deraadt <deraadt@openbsd.org>

pass size argument to free()
ok doug tedu


# 8cc2fc56 13-Jul-2014 tedu <tedu@openbsd.org>

use mallocarray for multiplied value checking


# 9e8577e7 12-Jul-2014 tedu <tedu@openbsd.org>

add a size argument to free. will be used soon, but for now default to 0.
after discussions with beck deraadt kettenis.


# e6c6495d 08-Jul-2014 deraadt <deraadt@openbsd.org>

decouple struct uvmexp into a new file, so that uvm_extern.h and sysctl.h
don't need to be married.
ok guenther miod beck jsing kettenis


# d559b8cb 30-Mar-2014 guenther <guenther@openbsd.org>

Eliminates struct pcred by moving the real and saved ugids into
struct ucred; struct process then directly links to the ucred

Based on a discussion at c2k10 or so before noting that FreeBSD and
NetB

Eliminates struct pcred by moving the real and saved ugids into
struct ucred; struct process then directly links to the ucred

Based on a discussion at c2k10 or so before noting that FreeBSD and
NetBSD did this too.

ok matthew@

show more ...


# 8f76f5ad 26-Mar-2014 guenther <guenther@openbsd.org>

Move p_emul and p_sigcode from proc to process.
Tweak the handling of ktrace EMUL when changing ktracing: only
generate one per process (not one per thread) and pass the correct
proc pointer down to

Move p_emul and p_sigcode from proc to process.
Tweak the handling of ktrace EMUL when changing ktracing: only
generate one per process (not one per thread) and pass the correct
proc pointer down to the VFS layer. Permit generating of NAMI and
CSW records inside ktrace(2) itself.

ok deraadt@ millert@

show more ...


# 533be81a 22-Mar-2014 guenther <guenther@openbsd.org>

Move p_sigacts from struct proc to struct process.

testing help mpi@


# 91ba896d 21-Jan-2014 tedu <tedu@openbsd.org>

bzero -> memset


# 0c80682e 04-Jul-2013 tedu <tedu@openbsd.org>

now that free(null) is safe, delete checks


# 1344fd63 02-Jun-2013 guenther <guenther@openbsd.org>

Coredumping is now single-threaded, so update comment about locking


12345678