Age | Commit message (Collapse) | Author |
|
ok semarie
|
|
|
|
- use the error returned by pledge_socket_check()
- make the code to reflect the socket request (set code to PLEDGE_DNS for
dns-scoket, and to PLEDGE_INET else)
|
|
possible due to the move of failing case later.
|
|
- in sys_access() which call dofaccessat() and where the same note is already setted
- in sys_mkdir() which call domkdirat() and where the same note is already setted
- in sys_rmdir() which call dounlinkat() and where the same note is already setted
it makes the p_pledgenote affectation be near NDINIT/NDINITAT call.
|
|
the previous check in pledge_namei() was incomplete. For using SYS_chroot we
needed "id", and we could have passed pledge_namei() just with "rpath" (without
using the now removed whitelisted entry).
the check for "rpath id proc" is now done using p_pledgenote: pledge_namei()
will check that the pledgenote is permitted by your pledge.
"go ahead" deraadt@
|
|
ok mpi@
|
|
IP, to avoid memory alignment issues in the IP stack.
ok miod@, mpi@
|
|
- remove all explicit checks that ensure p_pledgenote have counterpart in
ps_pledge by one unique check. It makes management of explicit whitelisted
operations on some paths more simple to manage. And now, we can use
p_pledgenote for more fined checking in namei usage.
- add special case for unsetted p_pledgenote: the behaviour is the same as
previously (we allow the operation with "rpath", "wpath" or "cpath" request)
but it should be changed soon to be more strict.
"go ahead" deraadt@
|
|
error currently is ENAMETOOLONG), so don't use p_pledgenote when failing.
|
|
processing.
|
|
From uwe@
|
|
ok mpi@ bluhm@
|
|
|
|
die and ifp->if_mtu is the one true mtu.
Suggested by and OK mpi@
|
|
|
|
suspect everyone has upgraded through the approx week-long window since
SOCK_DNS became available and the libc resolver started using them.
|
|
|
|
suspect everyone has upgraded through the approx week-long window since
SOCK_DNS became available and the libc resolver started using them.
|
|
NDINIT should be preceded by setting pledgenote to indicate what
the operation is for.
|
|
noticed by semarie
|
|
p_pledgenote before NDINIT()
|
|
p_pledgenote as required.
XXX open question to guenther regarding FREAD to vnopen() / vnclose()
|
|
|
|
|
|
same change made in the sparc equivalent a while ago
|
|
|
|
|
|
|
|
|
|
the lifetime of an ``ifa'' is tied to a route entry, so it might no
longer be valid after calling rtfree(9).
While here put a KERNEL_LOCK() around the per-ifp address list iteration.
ok bluhm@
|
|
initializing hash objects. No binary or functional change.
|
|
specify custom counter value when setting up Chacha context.
ok reyk djm
|
|
ok bluhm@
|
|
ok bluhm@
|
|
|
|
No change for GCM, however upcoming changes will rely on this.
|
|
ok bluhm@
|
|
ok tedu@
|
|
OK jsing@
|
|
|
|
|
|
no pledge to recommend.
|
|
|
|
- for PLEDGE_FATTR: the code is more accurate to be PLEDGE_FATTR, has
p->p_pledgenote could have multiple bits inside, and it is the lake of
PLEDGE_FATTR that make the check fail.
- for PLEDGE_RECVFD and PLEDGE_SENDFD, change the error to be EINVAL: we fail,
not because of lake of PLEDGE_RECVFD / PLEDGE_SENDFD permission, but because
the value passed is invalid in pledged program (for example trying to send a
VDIR).
"go ahead" deraadt@
|
|
provide the required pledge request for pledge_fail().
ok deraadt@
|
|
ok guenther@
|
|
|
|
Requested by stsp
|
|
used less than "stdio" -- include all the "self" operations. Instead of
different defines, use regular PLEDGE_* in the "p_pledgenote" variable
(which indicates the operation subtype a system call is performing). Many
checks before easier to understand. p_pledgenote can often be passed
directly to ktrace, so that kdump says:
15565 test CALL pledge(0xa9a3f804c51,0)
15565 test STRU pledge request="stdio"
15565 test RET pledge 0
15565 test CALL open(0xa9a3f804c57,0x2<O_RDWR>)
15565 test NAMI "/tmp/testfile"
15565 test PLDG open, "wpath", errno 1 Operation not permitted
with help from semarie, ok guenther
|