summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-07-23Don't cast malloc(3) size to u_int.cheloha
Large buffer sizes on 64-bit platforms cause the sum to wrap, leading read(2) to fail later. We check prior to this point that all buffer sizes are <= SSIZE_MAX. SSIZE_MAX * 2 < SIZE_MAX on all platforms, so the addition here will not overflow and cause a similar issue. Discovered by tobias@ a while back. ok deraadt millert tobias
2018-07-23Remove more redundant element selectors where the class selectorIngo Schwarze
is already sufficient. John Gardner tells me that "CSS selectors should only contain what's necessary to target their subjects".
2018-07-23replace the last instances of ex units by em;Ingo Schwarze
recommended by John Gardner <gardnerjohng at gmail dot com>
2018-07-23Coverity CID 1470233 complainst that the m != NULL check inAlexander Bluhm
syn_cache_get() is not neccessary. Also make the abort label consistent to resetandabort and free the mbuf there. OK mpi@
2018-07-23oops, failed to notice that SEE ALSO got messed up;Jason McIntyre
2018-07-23Add missing $OpenBSD$ CVS tag.rob
2018-07-23The imxiomuxc(4) node itself can also contain a set of pins toPatrick Wildt
configure. These are pins that should be configured to a sane state and are not necessarily referenced by another node. ok kettenis@
2018-07-23Point to glob in section 7 for the actual list of special characters insteadkn
the C API in section 3. OK millert jmc nicm, "the right idea" deraadt
2018-07-23Document tls_peer_ocsp_result() and use it in place of the non-existentTheo Buehler
tls_peer_ocsp_result_msg() in the documentation. input & ok jsing Reads fine to jmc and makes sense to schwarze
2018-07-23Use BN_swap_ct() instead of BN_consttime_swap() inTheo Buehler
ec_GF2m_montgomery_point_multiply(). The new BN_swap_ct() API is an improved version of the public BN_consttime_swap() function: it allows error checking, doesn't assert(), and has fewer assumptions on the input. This diff eliminates the last use of BN_consttime_swap() in our tree. ok inoguchi, jsing
2018-07-23Use a size_t instead of an int for the byte count in BN_swap_ct().Theo Buehler
Since bignums use ints for the same purpose, this still uses an int internally after an overflow check. Suggested by and discussed with jsing. ok inoguchi, jsing
2018-07-23Clean up our disgusting implementations of BN_{,u}{add,sub}(), followingTheo Buehler
changes made in OpenSSL by Davide Galassi and others, so that one can actually follow what is going on. There is no performance impact from this change as the code still does essentially the same thing. There's a ton of work still to be done to make the BN code less terrible. ok jsing, kn
2018-07-23Do "Return stack refilling", based on the "Return stack underflow" discussionPhilip Guenther
and its associated appendix at https://support.google.com/faqs/answer/7625886 This should address at least some cases of "SpectreRSB" and earlier Spectre variants; more commits to follow. The refilling is done in the enter-kernel-from-userspace and return-to-userspace-from-kernel paths, making sure to do it before unblocking interrupts so that a successive interrupt can't get the CPU to C code without doing this refill. Per the link above, it also does it immediately after mwait, apparently in case the low-power CPU states of idle-via-mwait flush the RSB. ok mlarkin@ deraadt@
2018-07-23Implement RSASSA-PKCS1-v1_5 as specified in RFC 8017.Theo Buehler
Based on an OpenSSL commit by David Benjamin. Alex Gaynor and Paul Kehrer from the pyca/cryptography Python library reported that more than 200 "expected to fail" signatures among Project Wycheproof's test vectors validated on LibreSSL. This patch makes them all fail. ok jsing commit 608a026494c1e7a14f6d6cfcc5e4994fe2728836 Author: David Benjamin <davidben@google.com> Date: Sat Aug 20 13:35:17 2016 -0400 Implement RSASSA-PKCS1-v1_5 as specified. RFC 3447, section 8.2.2, steps 3 and 4 states that verifiers must encode the DigestInfo struct and then compare the result against the public key operation result. This implies that one and only one encoding is legal. OpenSSL instead parses with crypto/asn1, then checks that the encoding round-trips, and allows some variations for the parameter. Sufficient laxness in this area can allow signature forgeries, as described in https://www.imperialviolet.org/2014/09/26/pkcs1.html Although there aren't known attacks against OpenSSL's current scheme, this change makes OpenSSL implement the algorithm as specified. This avoids the uncertainty and, more importantly, helps grow a healthy ecosystem. Laxness beyond the spec, particularly in implementations which enjoy wide use, risks harm to the ecosystem for all. A signature producer which only tests against OpenSSL may not notice bugs and accidentally become widely deployed. Thus implementations have a responsibility to honor the specification as tightly as is practical. In some cases, the damage is permanent and the spec deviation and security risk becomes a tax all implementors must forever pay, but not here. Both BoringSSL and Go successfully implemented and deployed RSASSA-PKCS1-v1_5 as specified since their respective beginnings, so this change should be compatible enough to pin down in future OpenSSL releases. See also https://tools.ietf.org/html/draft-thomson-postel-was-wrong-00 As a bonus, by not having to deal with sign/verify differences, this version is also somewhat clearer. It also more consistently enforces digest lengths in the verify_recover codepath. The NID_md5_sha1 codepath wasn't quite doing this right. Reviewed-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Rich Salz <rsalz@openssl.org> GH: #1474
2018-07-23When moving between networks slaacd configures new addresses butFlorian Obser
leaves old ones behind. The IPv6 RFCs don't seem to offer guidance on what to do in this case. (RFC 5220 discusses related issues, but not exactly this.) It seems a bit harsh to just delete old addresses - a naive implementation can easily lead to flip-flopping between two prefixes. Instead set the preferred lifetime to 0 for all addresses on an interface when the link goes down, thus marking addresses as deprecated but still usable. When the link comes back send a router solicitation. If we are still on the old network and receive a router advertisement the preferred lifetime will increase and the addresses will no longer be deprecated. If we moved to a new network we will get new router advertisements and form new addresses. The old ones will stay deprecated and the address selection algorithm will prefer new addresses. Problem reported by many. testing & OK phessler
2018-07-23avoid using argv[0] for printing to stderrTheo Buehler
2018-07-23add _rad userFlorian Obser
OK tb, claudio
2018-07-23Remove rtadvd(8) rc script.Florian Obser
2018-07-23Remove rtadvd(8), it's time to switch to rad(8).Florian Obser
2018-07-23syncFlorian Obser
2018-07-23Remove rtadvd(8) leftovers in etc.Florian Obser
OK deraadt, phessler
2018-07-23It's time to switch to rad(8); tested by many.Florian Obser
Unhook rtadvd from build. OK deraadt, phessler
2018-07-23It's time to switch to rad(8); tested by many.Florian Obser
Remove rtadvd(8) from rc(8). OK deraadt, phessler
2018-07-23replace references to rtadvd(8) with rad(8)Florian Obser
OK deraadt, phessler, jmc
2018-07-23Handle duplicate address detection failures.Florian Obser
We get notified when duplication is detected on the route socket. For privacy addresses simply generate a new random address. If we have soii enabled increase the dad counter on the prefix and generate a new address. For eui64 addresses nothing can be done.
2018-07-22No need to re-implement realloc(). Just use itKenneth R Westerback
the way the man page says. ok tb@
2018-07-22cross reference sndio(7) and sndiod(8); from weerd@;Ingo Schwarze
OK ratchov@ jmc@ (who are both busy)
2018-07-22document method=https, and use it in the example config;Jason McIntyre
from lauri tirkkonen; ok sthen beck
2018-07-22First iteration of implementing full mrt dumping/printing support in bgpctl.Claudio Jeker
This is good enough as a start but I guess output could be nicer. OK benno@
2018-07-22Move nexthop into struct filterstate (including nexthop flags) and useClaudio Jeker
them whereever possible. In some places (path_update, softreconfig_out handler) the nexthop state is temporarily folded back into the rde_aspath. Tested and OK benno@
2018-07-22Add more information to if_change() debug log using the new interface helperClaudio Jeker
functions in util.c. The idea is to make even debug messages as informative as possible. Before: if_change: ifindex 1, ifi_rdomain 0 After: if_change: em0: rdomain 0 UP, Ethernet, active, 1000 Mbps OK benno@
2018-07-22Move functions to print link status etc. to util.c so that bgpd can use themClaudio Jeker
as well. OK benno@
2018-07-22In uvm_map_protect(), make sure we select a first map entry that ends afterMark Kettenis
the start of the range of pages that we're changing. Prevents a panic from a somewhat convoluted test case that anton@ came up with. ok guenther@, anton@
2018-07-22Switch authorized_keys example from ssh-dss to ssh-rsa since the formerDarren Tucker
is no longer enabled by default. Pointed out by Daniel A. Maierhofer, ok jmc
2018-07-22Fix arguments of pf_purge_expired_{src_nodes,rules}()Stefan Fritsch
Due to the missing "void", this extern void pf_purge_expired_src_nodes(); is no prototype but a declaration. It is enough to suppress the 'implicit declaration' warning but it does not allow the compiler to check the arguments passed to the calls of the function. Fix the prototypes and don't pass the waslocked argument anymore. It has been removed a year ago. ok sashan henning
2018-07-22Tweak comment about truncating NULs to reflect newKenneth R Westerback
reality.
2018-07-22When finished pulling an option out of a buffer, skip directly to theKenneth R Westerback
next option. Don't rely on truncated NULs being ignored because NUL == DHO_PAD. ok tb@
2018-07-22hook up fchownanton
2018-07-22Add regress covering the recently fixed NULL pointer deref in fchown().anton
2018-07-22Avoid a NULL pointer deref when calling fchown() on a file descriptor belonginganton
to a cloned device. ok kettenis@
2018-07-22Adjust a log message and make sure that the data pointer is never increasedClaudio Jeker
beyond the end. There was no access to it but still bad style. OK tb@
2018-07-21Reading past the end of a buffer is bad, Even if theKenneth R Westerback
extra byte is always there. Even if the byte contains innocuous data that isn't used. Eeven if a particular level of optimization of a particular compiler avoids it by processing things backwards. Bad. So simplify and correct logic. Perhaps even proof the code against future generations of clever compilers. Pointed out by Brandon Falk. Thanks! ok millert@ tb@
2018-07-21comment out a dead Xr;Jason McIntyre
2018-07-21sort;Jason McIntyre
2018-07-21Include the vnode type in the panic message in ffs_write(), just like ffs_read()anton
does. ok deraadt@ kettenis@
2018-07-21There is no need to initialise global and static local variables to zero,Claudio Jeker
they are like that by default. OK florian@
2018-07-21Remove the "got meltdown?" conditional from INTRENTRY by doing itPhilip Guenther
unconditionally and codepatching it out on CPUs that don't need/do the mitigation. Align the from-{kernel,userspace} targets in INTRENTRY with _ALIGN_TRAPS Align x2apic_eoi using KUENTRY() instead of the artisinal segment+label+.globl bits it uses currently s/testq/testb/ for SEL_RPL checks ok kettenis@ mlarkin@
2018-07-20The newly added realpath(3) in vmd's parse.y checks whether theAlexander Bluhm
directories exist. Create the path and file for test vmd-fail-disk-path-too-long.
2018-07-20Listen on 127.0.0.1 and ::1 in the regress config since the test use localhostClaudio Jeker
which can be resolved to either of the two values. OK bluhm@
2018-07-20Remove a few leftovers from the days of emulation, which could result inTheo de Raadt
a bad/corrupt binary not returning ENOEXEC but some other error. ok guenther kettenis bluhm