summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-10-21Only enable SSL_VERIFY_PEER when the verify option is set on a listener.Joel Sing
Always enabling SSL_VERIFY_PEER unnecessarily increases the number of messages/bytes in the TLS handshake and increases our attack surface, since we request and then process client certificates. ok gilles@
2015-10-21In the case where len is not a multiple of sizeof(RC4_CHUNK) the RC4 codeJoel Sing
will end up doing a read and write of up to 7 bytes beyond the specified length. This is effectively a non-issue since we read and write back the same data and due to alignment it is within a page boundary. Regardless, avoid this by removing the "special" handling for the remaining length and allow the standard (non-chunk) code to process the remaining bytes, which does not result in overrun. Reported by Pascal Cuoq <cuoq at trust-in-soft.com> - thanks! ok beck@ miod@
2015-10-21Setting fcntl(F_SETOWN) for a pipe failed with inappropriate ioctlAlexander Bluhm
for device. In sys_fcntl() the ioctl(TIOCSPGRP) is called, but the pipe expects SIOCSPGRP. Sockets have a specal case for the same reason, so adapt the special code for pipes. OK millert@
2015-10-21Style fixes; from Ilya KalimanTodd C. Miller
2015-10-21Remove a couple of unhelpful defines.mmcc
ok nicm@
2015-10-21Don't bother casting NULL.mmcc
ok nicm@
2015-10-21Assign pointer to NULL rather than 0.mmcc
ok nicm@
2015-10-21Penultimate commit to remove EXTERN.mmcc
ok nicm@
2015-10-21Do some cleanup in syslogd ttymsg(). Add a debug message when theAlexander Bluhm
syslogd child calls fork(2) to delay blocked output. OK benno@
2015-10-21client_key_table was missing.Nicholas Marriott
2015-10-21fix memory leak in error pathGleydson Soares
ok djm@
2015-10-21add missing rcsidGleydson Soares
ok renato@
2015-10-21By popular demand add a default binding for mouse wheel up to scrollNicholas Marriott
into history (if the mouse is, on of course).
2015-10-21make sure ProgressMeter gets set up. Fixes some weirdness in package installs,Marc Espie
as it now must contain a proper linkback to its own state.
2015-10-21No longer mention rtable_get(), it's a private function now.Martin Pieuchot
While here use C99 types in function definitions.
2015-10-21Return the correct error code when a table already exists.Martin Pieuchot
2015-10-21u_short -> unsigned int for rtableid.Martin Pieuchot
2015-10-21Do not call uvm_swap_finicrypt_all() a second time in dumpsys().Martin Pieuchot
ok tedu@, deraadt@, miod@
2015-10-21Remove Diffie-Hellman moduli entries below 2048.Doug Hogan
OpenSSH requires a 2048 minimum for DH in the client and server. input and ok sthen@ ok dtucker@, djm@
2015-10-21Add support for route summarization.Renato Westphal
Working great but need more testing, especially with ipv6. For now we don't validate if one configured summary is inside another or the presence of duplicates. Will address these issues in a future commit.
2015-10-21Minor fixes and code cleanup.Renato Westphal
2015-10-20Compare pointers to NULL rather than 0.mmcc
ok djm@
2015-10-20tweak previous;Jason McIntyre
2015-10-20Use client pointer not file descriptor in logging.Nicholas Marriott
2015-10-20add a new getsockopt option IP_IPDEFTTL to retrieve the default ttl.Sebastian Benoit
this can be used as an alternative to sysctl net.inet.ip.ttl, in programs that use pledge(). ok reyk@, "Like this" deraadt@
2015-10-20Fix write to other user's tty. The device has to be opened withAlexander Bluhm
O_WRONLY, but without O_CREAT. So freopen(3) has to be replaced with open(2) and dup2(2). from deraadt@
2015-10-20believe this will work with "stdio rpath wpath cpath inet" now thatTheo de Raadt
SO_RCVBUF is permitted. It may even be possible to lose the "inet" a bit later in the code. Anyone want to test?
2015-10-20Document SOCK_DNS flagTheo de Raadt
ok guenther tedu semarie
2015-10-20At guenther's suggestion replace dnssocket() with a SOCK_DNS flag onTheo de Raadt
socket(). Without pledge, all other socket behaviours become permitted, except this one case: connect/send* only works to *:53. In pledge mode, a very few are further restricted. Some backwards compatibility for the dnssocket/dnsconnect calls will remain in the tree temporarily so that people can build through the transition. ok tedu guenther semarie
2015-10-20Add SIOCGIFGMEMB to "route" (returns a list of all interfaces who areReyk Floeter
member of the given group). This is used by some parse.y. OK deraadt@
2015-10-20Fix 802.1p VLAN priority code points for VLAN_HWTAGGING.Christopher Zimmermann
Our in-kernel ether-vtag has a different layout to the vr TXSTAT register. ok sthen@
2015-10-20... but keep the previous logic for sparc, which is the other user of thisMiod Vallat
Makefile, until it switches to MI installboot, too.
2015-10-20Missing commit of vax switch to MI installboot(8), forgotten when it went in.Miod Vallat
2015-10-20Lob a style(9) grenade in here.Joel Sing
2015-10-20add "proc" to pledge for script(1)Sebastien Marie
it needs to "forward" SIGWINCH to subprocesses. ok deraadt@
2015-10-20The table could change when retrying so don't save it at start ofNicholas Marriott
server_client_handle_key.
2015-10-20After pledge "dns" has been refactored and setsockopt(SO_RCVBUF)Alexander Bluhm
has been added to it, the syslogd privsep parent does not need pledge "inet" anymore. discussed with deraadt@
2015-10-20Add an explicit check for a malformed AS segment with (segment length 0),Stuart Henderson
avoiding division by zero when deciding whether it contains 2- or 4-byte ASNs. Refactor TCHECK calls to ensure proper coverage. From Kevin Reay, ok canacar with wording tweak (I used "malformed" rather than canacar's suggested "invalid size" or Kevin's original "empty").
2015-10-20fix a use after free found by clang using an approach suggested by renatoJonathan Gray
ok renato@
2015-10-20On xmalloc failure, stop trying to determine the total amount of allocatedPascal Stumpf
memory up to this point by using sbrk(2). This is of course wildly incorrect for any mmap-based malloc(3). This also makes it possible to bring pledge(2) to gnu/. comments kettenis@, ok miod@
2015-10-20update regress for pledge after whitelisted-path view inclusionSebastien Marie
2015-10-20Fix ocsp by adding a missing TAILQ_INIT().Reyk Floeter
Confirmed by markus@ with an identical diff
2015-10-20clear whitelisted-paths view in pledge.Sebastien Marie
the following diff adds a clear view of whitelisted-paths in pledge. before, whitelisting "/usr/local/bin" path would make only "/usr/local/bin" VNODE was present and let "/usr/local", "/usr", and "/" been ENOENT. It was a somehow odd filesystem hierarchy, and it breaks realpath(3). with this diff, the directories that are one of the parents of a whitelisted-directory become visible to stat(2) related syscalls, but only with restricted permissions: stat(2) will lie a bit, and saying they owned by root:wheel and mode is --x--x--x. Note that only stat(2) is affected by this "view", and the owner/mode aren't effectively changed: it is just a "lie". while here, refactor a bit pledge_namei() in order to avoid multiple for-loop on whitelisted-path array. ok deraadt@
2015-10-20allow SO_ERROR all the timeTheo de Raadt
2015-10-20syncTheo de Raadt
2015-10-20Replace a function-local allocation with stack memory.mmcc
ok djm@
2015-10-20In order to become able to generate syntax tree nodes on the roff(7)Ingo Schwarze
level, validation must be separated from parsing and rewinding. This first big step moves calling of the mdoc(7) post_*() functions out of the parser loop into their own mdoc_validate() pass, while using a new mdoc_state() module to make syntax tree state handling available to both the parser loop and the validation pass.
2015-10-20Always allow the setsockopt & getsockopt system calls... however, in theTheo de Raadt
default case only allows SOL_SOCKET SO_RCVBUF which is very common in network-facing daemons. Many of them manage this on a socket after dropping abilities which can get them _new_ sockets.. syslogd, bgpd, relayd, etc etc. Other sockopts still require specific pledges. Tested by bluhm.
2015-10-19Remove old tame() stubTheo de Raadt
2015-10-19Add pledge(2) for radiusctl(8) and radiusd(8).YASUOKA Masahiko
- radiusd: "stdio inet" - radiusd_radius: "stdio inet" - radiusd_bsdauth: - "stdio proc" for the non-priviledged process - "stdio getpw rpath proc exec" for the priviledged process - radiusctl: "stdio dns inet" "go ahead" deraadt