| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
does not block the signal. If all threads block the signal, we
delivered it to the main thread. This does not conform to POSIX.
If any thread unblocks the signal, it should be delivered immediately
to this thread.
Mark such signals pending at the process instead of a single thread.
Then any thread can handle it later.
OK kettenis@ guenther@
|
|
|
|
|
|
|
|
| |
encountered a wxneeded binary that attempts correct operation when started
on a nowxallowed filesystem (it tries mprotect with RWX, notices ENOTSUP
and acts in a different way). So permit execution (but of course don't
allow W^X violating mappings)
ok sthen kettenis robert
|
|
|
|
|
|
| |
instead of panicing
ok deraadt@, tedu@, mpi@
|
|
|
|
| |
Now that alpha is fixed, we can use sizeof().
|
|
|
|
|
|
|
|
| |
to pass the real count, with a minimal .shstrtab segment for consistency.
Also, add support for PN_XNUM to readelf.
problem reported and testing by claudio@
ok kettenis@
|
|
|
|
|
|
|
|
| |
to the namei args. This fixes a bug where chmod would be allowed when
with only READ. This also allows some further cleanup of some awkward
things like PLEDGE_STAT that will follow
Lots of assistence from semarie@ - thanks!
ok semarie@
|
|
|
|
|
| |
a bad/corrupt binary not returning ENOEXEC but some other error.
ok guenther kettenis bluhm
|
|
|
|
|
|
| |
later on, and it makes no sense for a binary to have such a segment.
ok bluhm@, guenther@
|
|
|
|
|
|
|
|
| |
instead of passing sendsig() the code+type+val, pass a siginfo_t*
to copy from. Eliminate the indirection through struct emul for
sendsig(); we no longer have a SunOS4-compat version of sendsig()
ok deraadt@
|
|
|
|
| |
ok deraadt@ krw@
|
|
|
|
|
|
|
| |
even if the pointer is NULL. This is not a real bug as free(9)
checks the addr pointer before the size value, but the compiler
cannot know that.
found by clang -Wuninitialized; OK deraadt@
|
|
|
|
|
|
| |
avoid leaking the contents of the kernel stack into userspace.
ok guenther@, deraadt@
|
|
|
|
|
|
|
| |
uvm_coredump_walkmap() to do both with a callback in between
so it can hold locks/change state across the two.
ok stefan@
|
|
|
|
|
|
| |
interpreter whose entry point isn't in its first PT_LOAD segment.
problem report and testing by patrick@
|
|
|
|
|
|
| |
last used by COMPAT_SYSV which was removed in 2011.
ok millert@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
leaving out the size, so that
ELFNAME2(exec,makecmds)
becomes
exec_elf_makecmds
instead of
exec_elf{32,64}_makecmds
and then delete the ELFNAME2() and ELFNAMEEND() macros.
Move the prototypes for functions local to exec_elf.c to there from
exec_elf.h.
Simplify the SMALL_KERNEL conditionals around the ELF coredump code.
Change exec_conf.c to use the size-generic names and macros
Remove exec_elf{32,64}.c and just build exec_elf.c; delete the
_KERN_DO_ELF and _KERN_DO_ELF64 #defines.
ok jca@, encouragement from deraadt@ and tom@
|
|
|
|
|
|
| |
and not something we guarantee to userspace
ok jca@
|
|
|
|
|
|
| |
from all but one call
ok jca@
|
|
|
|
| |
ok jca@
|
|
|
|
|
|
| |
of ELFDEFNNAME(NO_ADDR)
ok jca@
|
|
|
|
|
|
| |
delete the no-longer-used probe hook support.
ok mpi@ jca@
|
|
|
|
|
|
| |
struct proc to struct process.
ok deraadt@ kettenis@
|
|
|
|
|
|
| |
initial thread
ok jsing@ kettenis@
|
|
|
|
| |
ok mpi@ mikeb@
|
|
|
|
|
|
|
| |
file system mounted without MNT_WXALLOWED, fail with EACCES rather
than with ENOEXEC, to discourage the shell from trying to run the
file as a shell script.
OK deraadt@ millert@; tedu@ and halex@ agreed with the general direction.
|
|
|
|
|
|
| |
the string into kernel space before logging the W^X binary warning.
ok jca@, guenther@
|
|
|
|
|
|
|
|
| |
dynamic linker will make these read-only and add back X permission after
elocation processing. Static executables with W|X segments will probably
crash.
ok deraadt@, guenther@
|
|
|
|
|
|
|
|
|
|
|
| |
flag set by ld -zwxneeded. Such binaries are allowed to run only on wxallowed
mountpoints. They do not report mmap/mprotect problems.
Rate limit mmap/mprotect reports from other binaries.
These semantics are chosen to encourage progress in the ports ecosystem,
without overwhelming the developers who work in the area.
ok sthen kettenis
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
inside the sigcontext. sigreturn(2) checks syscall entry was from the
exact PC addr in the (per-process ASLR) sigtramp, verifies the cookie,
and clears it to prevent sigcontext reuse.
not yet tested on landisk, sparc, *88k, socppc.
ok kettenis
|
|
|
|
|
|
|
| |
Remove "option COMPAT_LINUX" and everything directly tied to it from the
kernel and the corresponding man page documentation.
ok visa@ guenther@
|
|
|
|
|
|
|
|
|
|
| |
pledgenote is used for annotate the policy for a namei context. So make it
tracking the nameidata.
It is expected for the caller to explicitly define the policy. It is a kernel
bug to not do so.
ok deraadt@
|
| |
|
|
|
|
| |
ok guenther tedu
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
| |
ok deraadt@ millert@ miod@
|
|
|
|
|
| |
test cases provided by Alejandro Herna'ndez (nitrousenador (at) gmail.com)
ok deraadt@ jsg@
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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@
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
committing the printfs. revert.
|
|
|
|
| |
it multiple times. Also remove an unused variable. OK deraadt@ tedu@
|
| |
|