summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2015-01-31fix macro usage; from Kaspars at Bankovskis dot netIngo Schwarze
2015-01-30fix a possible NULL-deref when trying to deref ifa->ifa_addrGilles Chehade
ok eric@
2015-01-30Make the TLS connect and accept error messages consistent.Alexander Bluhm
OK jsing@
2015-01-30Rework vis.3 so it has standard sections.Doug Hogan
Moved the return values from the description to a proper return values section. Broke up the description into function description followed by a subsection for the range and encoding. Replaced srclen with strlen(src) when srclen isn't an argument. Moved the common flag argument to its own paragraph. input schwarze@, input + ok jmc@
2015-01-29Use .Rv where appropriate, and move it to RETURN VALUES;Ingo Schwarze
remove .Tn, and a few minor macro adjustments. Patch from Kaspars at Bankovskis dot net.
2015-01-28dial the time back to about 0.1s, closer to the original targets andTed Unangst
friendlier for users. requested by deraadt
2015-01-28Fix a number of issues relating to algorithms in signatures, MostlyBob Beck
from OpenSSL with a hint of boring and some things done here. Addresses CVE-2014-8275 for OpenSSL fully ok miod@ doug@
2015-01-26Place the remainder of e_os2.h under #ifndef LIBRESSL_INTERNAL until we canJoel Sing
hopefully remove it completely - nothing in LibreSSL should be making use of any of these defines.
2015-01-26Add AEAD as a "MAC alias" so that it is possible to identify/select ciphersJoel Sing
that use AEAD instead of a MAC. This allows for TLSv1.2 AEAD ciphers (effectively the only ciphers that are still considered to be secure) to be selected using TLSv1.2+AEAD as a cipher string. ok bcook@ doug@ miod@
2015-01-25mention that the kern.global_ptrace sysctl also affects PT_ATTACHTed Unangst
2015-01-24Add back <sys/param.h>; it's needed for MACHINE_STACK_GROWS_UP.Mark Kettenis
ok millert@, tobiasu@
2015-01-23More missing $OpenBSD$.Kenneth R Westerback
ok nicm@
2015-01-23Ensure that a ServerKeyExchange message is received if the selected cipherJoel Sing
suite uses ephemeral keys. This avoids an issue where an ECHDE cipher suite can effectively be downgraded to ECDH, if the server omits the ServerKeyExchange message and has provided a certificate with an ECC public key. Issue reported to OpenSSL by Karthikeyan Bhargavan. Based on OpenSSL. Fixes CVE-2014-3572. ok beck@
2015-01-22Fix logic botch causing warnings with Clang. Reported by dhill, matchesMiod Vallat
similar changes in FreeBSD a few years ago.
2015-01-22Possibly uninitialized variable. From Clang via dhill.Miod Vallat
2015-01-22Document that changes made to the directory hierarchy of the chrootTodd C. Miller
jail may inadvertanly allow a process to escape. Also mention the problem of directory fd passing. Based on a diff from deraadt@
2015-01-22Use field names in struct initialisers.Joel Sing
No change to generated assembly.
2015-01-22last entry in NAME should not have a trailing comma;Jason McIntyre
2015-01-22Add MLINK for tls_config_set_ca_mem()Reyk Floeter
2015-01-22Allow to to load the CA chain directly from memory instead ofReyk Floeter
specifying a file. This enables CA verification in privsep'ed processes that are running chroot'ed without direct access to the certificate files. With feedback, tests, and OK from bluhm@
2015-01-22Support CA verification in chroot'ed processes without direct fileReyk Floeter
access to the certificates. SSL_CTX_load_verify_mem() is a frontend to the new X509_STORE_load_mem() function that allows to load the CA chain from a memory buffer that is holding the PEM-encoded files. This function allows to handle the verification in privsep'ed code. Adopted for LibreSSL based on older code from relayd (by pyr@ and myself) With feedback and OK bluhm@
2015-01-22Add X509_STORE_load_mem() to load certificates from a memory bufferReyk Floeter
instead of disk. OpenSSL didn't provide a built-in API from loading certificates in a chroot'ed process that doesn't have direct access to the files. X509_STORE_load_mem() provides a new backend that will be used by libssl and libtls to implement such privsep-friendly functionality. Adopted for LibreSSL based on older code from relayd (by pyr@ and myself) With feedback and OK bluhm@
2015-01-22Assume that the size of a pointer will not change at runtime.Brent Cook
Change the runtime check for whether a long is smaller than a pointer to a compile-time check. Replace the silly hash for LLP64 platforms. ok tedu@
2015-01-22Do not need to include <sys/cdefs.h> when headers included above end upTheo de Raadt
doing so.
2015-01-21Truncate progname to NAME_MAX in the syslog message, to ensure otherTheo de Raadt
information also makes it through. This is a compromise to cope with the absolutely ridiculous setprogname() API. ok various discussions
2015-01-21Fix DTLS memory leak (CVE-2015-0206).Doug Hogan
There were four bugs fixed by this patch: * dtls1_buffer_record() now frees rdata->rbuf.buf on error. Since s->s3->rbuf was memset, rdata->rbuf is the only pointer left which points to the old rbuf. On error, rdata is freed so there will not be any way of freeing this memory unless we do it here. * Changed the return code of dtls1_buffer_record() to differentiate between queue full (0) and error (-1). See below as this differs from upstream. * Handle errors if calls to dtls1_buffer_record() fail with -1. Previously, it did not check the return value. * Changed the way receipts are recorded. Previously, it was recorded when processed successfully (whether buffered or not) in dtls1_process_record(). Now, it records when it is handled in dtls1_get_record(): either when it is entered into the queue to buffer for the next epoch or when it is processed directly. Processing buffered records does not add a receipt because it needed one in order to get into the queue. The above bugs combined contributed to an eventual DoS through memory exhaustion. The memory leak came from dtls1_buffer_record()'s error handling. The error handling can be triggered by a duplicate record or malloc failure. It was possible to add duplicate records because they were not being dropped. The faulty receipts logic did not detect replays when dealing with records for the next epoch. Additionally, dtls1_buffer_record()'s return value was not checked so an attacker could send repeated replay records for the next epoch. Reported to OpenSSL by Chris Mueller. Patch based on OpenSSL commit 103b171d8fc282ef435f8de9afbf7782e312961f and BoringSSL commit 44e2709cd65fbd2172b9516c79e56f1875f60300. Our patch matches BoringSSL's commit. OpenSSL returns 0 when the queue is full or when malloc() or pitem_new() fails. They return -1 on error including !ssl3_setup_buffers() which is another failure to allocate memory. BoringSSL and LibreSSL changed the return code for dtls1_buffer_record() to be 1 on success, 0 when the queue is full and -1 on error. input + ok bcook@, jsing@
2015-01-20Adjust <sys/param.h> comments regarding use of use of MAXFRAG, orTheo de Raadt
delete <sys/param.h> if now possible ok guenther
2015-01-20Revert some $OpenBSD$ additions about which there are doubts.Kenneth R Westerback
Suggested by deraadt@
2015-01-20We do not support AIO, so comment it out in the kqueue(2) manpage for now.Reyk Floeter
OK jmc@ guenther@
2015-01-20Missing $OpenBSD$'s.Kenneth R Westerback
ok deraadt@
2015-01-19Explicitly mention that PATH_MAX includes the NUL in the ENAMETOOLONGTodd C. Miller
description.
2015-01-19Talk about thread-local errno and do not mention "extern int errno".Todd C. Miller
Also correct the string version of error 0. OK guenther@
2015-01-19Add arc4random/getentropy shims for NetBSD.Brent Cook
The latest NetBSD (6.1.5) arc4random does not appear to reseed the CRNG state after a fork, so provide an override until the fork-safe version in CVS appears in a release. These are the same as the FreeBSD shims. ok deraadt@
2015-01-19Explicitly mention that PATH_MAX includes the NUL in the ENAMETOOLONGTodd C. Miller
description.
2015-01-19Back out changes unrelated to the ENAMETOOLONG diff.Todd C. Miller
2015-01-18Do not calculated the length of a report with an extra byte for theMartin Pieuchot
reportID because the kernel skips it. Problem reported and fix tested by Benjamin Baier.
2015-01-17Improve wording in alloca.Ted Unangst
1. it's not a bug; it's a caveat. 2. "slightly unsafe" gives me the willies. 3. one .Xr to malloc should suffice ok deraadt jmc
2015-01-17NGROUPS_MAX, not NGROUPSTheo de Raadt
2015-01-17Remove a pasto introduced in the last commit, spotted by schwarze@Todd C. Miller
2015-01-16Use ">", not ">=" when comparing length to HOST_NAME_MAX sinceTodd C. Miller
otherwise we end up needlessly replacing a NUL with a NUL. OK deraadt@
2015-01-16Replace HOST_NAME_MAX+1-1 with HOST_NAME_MAX. OK deraad@Todd C. Miller
2015-01-16Replace check for ">= HOST_NAME_MAX+1" with "> HOST_NAME_MAX".Todd C. Miller
OK deraadt@
2015-01-16Move to the <limits.h> universe.Theo de Raadt
review by millert, binary checking process with doug, concept with guenther
2015-01-16The SSL/TLS session Id context is limited to 32 bytes. Instead ofReyk Floeter
using the name of relayd relay or smtpd pki, use a 32 byte arc4random buffer that should be unique for the context. This fixes an issue in OpenSMTPD when a long pki name could break the configuration. OK gilles@ benno@
2015-01-16<sys/param.h> is not needed here either.Theo de Raadt
ok guenther millert doug
2015-01-16Complete the list of functions in the paragraph that mentions thatLawrence Teo
errbuf needs to hold at least PCAP_ERRBUF_SIZE chars.
2015-01-16Rename pcap_create()'s ebuf argument to errbuf to match the rest of theLawrence Teo
public pcap_* functions that use errbuf. Mainline libpcap also uses "errbuf" for pcap_create(). No object file change.
2015-01-16Add more missing argument names.Lawrence Teo
2015-01-16Remove pointless casts for several malloc/calloc/free calls. No objectLawrence Teo
file change.
2015-01-16Fix a use after free, where the already freed p->opt.source was used byLawrence Teo
pcap_cleanup_bpf() to disable monitor mode on 802.11 devices. feedback blambert@ ok deraadt@ mikeb@ millert@