summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2017-06-30Add test suite source files for expat 2.2.1.Alexander Bluhm
2017-06-30AmigaOS and pre-X Mac OS support has been dropped in upstreamAlexander Bluhm
libexpat. Remove obsolete header files, missed in previous commit.
2017-06-30Update libexpat to version 2.2.1 which has some security fixes.Alexander Bluhm
- CVE-2017-9233 CVE-2016-9063 CVE-2016-5300 CVE-2016-4472 CVE-2016-0718 CVE-2015-2716 CVE-2015-1283 CVE-2012-6702 CVE-2012-0876 have been addressed. Not all of them affect OpenBSD as we had fixes before. - Upstream uses arc4random_buf(3) now. Delete all code for other entropy sources to make sure to compile the correct one. Our library already used arc4random(3) before. - The overflow fixes in rev 1.11 and 1.12 of lib/xmlparse.c have been commited upstream in a different way. Use the upstream code to make maintenance easier. - Although it should be ABI compatible, there is a new global symbol align_limit_to_full_utf8_characters. As it is in lib/internal.h, add a Symbols.map to restrict the export. Do not bump the shared library version. - Use the internal expat's siphash.h. ports build ajacoutot@; move ahead deraadt@
2017-06-29take const off the timeval argument in the pending functions.David Gwynne
event_pending, evtimer_pending, and signal_pending all write to the timeval because that's how they tell the caller when the event is meant to fire. ok deraadt@ millert@ jmc@ schwarze@
2017-06-28.init stub creation doesn't need a jmp + .align to reach a branch target,Theo de Raadt
just fall into the code. The .align created a FILL zone in the .init section, which on i386 was filled with a NOP-sled, something we want to get away from. discussed with kettenis and tom
2017-06-22Use the tls_password_cb() callback with all PEM_read_bio_*() calls, so thatJoel Sing
we can prevent libcrypto from going behind our back and trying to read passwords from standard input (which we may not be permitted to do). Found by jsg@ with httpd and password protected keys.
2017-06-22Fix incorrect indentation.Joel Sing
2017-06-22Plug a memory leak in tls_keypair_cert_hash(), introduced in r1.60.Joel Sing
2017-06-22Remove dead code that has remained hiding since ressl.c r1.14!Joel Sing
2017-06-22Use the standard `rv' idiom in tls_keypair_load_cert(), rather thanJoel Sing
duplicating clean up code.
2017-06-22Distinguish between self-issued certificates and self-signed certificates.Joel Sing
The certificate verification code has special cases for self-signed certificates and without this change, self-issued certificates (which it seems are common place with openvpn/easyrsa) were also being included in this category. Based on BoringSSL. Thanks to Dale Ghent <daleg at elemental dot org> for assisting in identifying the issue and testing this fix. ok inoguchi@
2017-06-19port the RBT code to userland by making it part of libc.David Gwynne
src/lib/libc/gen/tree.c is a copy of src/sys/kern/subr_tree.c, but with annotations for symbol visibility. changes to one should be reflected in the other. the malloc debug code that uses RB code is ported to RBT. because libc provides the RBT code, procmap doesn't have to reach into the kernel and build subr_tree.c itself now. mild enthusiasm from many ok guenther@
2017-06-16mark files as BUILDFIRST, or write explicit dependencies, so that mostMarc Espie
programs will build even without a make depend first. okay tb@ millert@
2017-06-13no need for branding in .Nd lineTheo de Raadt
2017-06-12Add dprintf() and vdprintf() RETURN VALUES. OK deraadt@Todd C. Miller
2017-06-11request -> promises; from scott chelohaJason McIntyre
2017-06-11Add missing .Fn markup to in() and out(); found with mandoc -Tlint.Ingo Schwarze
Delete useless \*(Gt and \*(Lt while here.
2017-06-10remove lots of bogus escaping, some of which even broke the output;Ingo Schwarze
found with mandoc -Tlint
2017-06-10fix imprecise .Fa markup; found with mandoc -TlintIngo Schwarze
2017-06-10Fix broken markup of function pointer invocations; foundIngo Schwarze
with mandoc -Tlint. While here, delete .Tn macros.
2017-06-10fix broken markup of callback arguments; found with mandoc -TlintIngo Schwarze
2017-06-10fix a sentence that used unusual terminology, the wrong macro,Ingo Schwarze
and broken delimiter syntax; found with mandoc -Tlint
2017-06-10repair broken markup of callback argument; found with mandoc -TlintIngo Schwarze
2017-06-07Add an acct(5) flag for pledge violations. Then lastcomm(1) showsAlexander Bluhm
when something went wrong. This allows to monitor whether the system is under attack and that the attack has been prevented by OpenBSD pledge(2). OK deraadt@ millert@ jmc@
2017-06-01Remove branch prediction hint from conditional branch instruction.Christian Weisgerber
These hints are not recognized by clang's builtin assembler. From the corresponding amd64 change. ok visa@ kettenis@
2017-06-01Re-enabled futex based condvar & mutexes, they are not the cause ofMartin Pieuchot
vmd(8)'s regression.
2017-06-01New condvar introduced a regression with vmd(8), revert until it is found.Martin Pieuchot
Reported by Gregor Best.
2017-05-31Add support for EV_RECEIPT and EV_DISPATCH flagsMike Belopuhov
From FreeBSD via Jan Schreiber <jes at posteo ! de>, thanks! OK tedu, bluhm
2017-05-31install futex(2), ok mpiStuart Henderson
2017-05-30getrlimit is now allowed by "stdio"Theo de Raadt
2017-05-30Don't fall back to heapsort() if we would otherwise switch toTodd C. Miller
insertion sort (when the number of elements is < 7).
2017-05-29Enable futex-based mutex and condvar.Martin Pieuchot
ok everybody
2017-05-29SPINLOCK_SPIN_HOOK is no more, define our own set of macros.Martin Pieuchot
Prodded by kettenis@ and tedu@
2017-05-29sort SEE ALSO;Jason McIntyre
2017-05-29sort SEE ALSO;Jason McIntyre
2017-05-29Randomize link-order of libcrypto as we do with libc. This libraryTheo de Raadt
has many small functions without significant local storage, therefore less tail protection from -fstack-protector-strong to prevent their use as ROP gadgets. It is used in security contexts. Also many functions dribble pointers onto the stack, allowing discovery of gadgets via the fixed relative addresses, so let's randomly bias those. ok tedu jsing The rc script will soon need a strategy for skipping this step on machines with poor IO performance. Or maybe do it less often? However, I don't see many more libraries we'll do this with, these are the two most important ones.
2017-05-29It is distasteful to have manual pages which don't refer to realTheo de Raadt
function calls, but instead a "class" of functions like "sigsetops". Rename to sigaddset", and while at it improve documentation in sigprocmask(2) to point to it. ok tedu
2017-05-28Use membar_enter_after_atomic() and membar_exit_before_atomic().Martin Pieuchot
2017-05-27move sha224_initial_hash_value[] under !SHA2_SMALL; ok deraadt@ millert@Christian Weisgerber
2017-05-27New mutex and condvar implementations based on futex(2).Martin Pieuchot
Not enabled yet, it needs some SPINLOCK_SPIN_HOOK love and some bumps. Tested by many including sthen@ in a bulk. ok visa@, sthen@, kettenis@, tedu@
2017-05-26Avoid a potential NULL pointer dereference in d2i_ECPrivateKey().Joel Sing
Reported by Robert Swiecki, who found the issue using honggfuzz. ok bcook@
2017-05-25Add definitions for three OIDs used in EV certificates.Joel Sing
From Kyle J. McKay <mackyle at gmail dot com>
2017-05-24Support swapping 32-bit aligned elements on 64-bit platforms.Todd C. Miller
Previously they would be swapped a byte at a time when sizeof(int) != sizeof(long). Idea from FreeBSD.
2017-05-20Document that qsort falls back to heapsort() if the recursion depthTodd C. Miller
exceeds 2 lg N and add a reference to the introsort paper.
2017-05-20Use David Musser's introsort algorithm to fall back to heapsort(3)Todd C. Miller
when the recursion depth reaches 2*lg(n + 1). This avoids quicksort's quadratic behavior for pathological input without appreciably changing the average run time.
2017-05-17The BSD qsort() performs tail recursion elimination on the secondTodd C. Miller
side of the array being partitioned to save on stack space. Greater savings can be gained by choosing recursion for the smaller side of the partition and eliminating recursion for the larger side. This also results in a small but measurable performance gain. OK otto@ schwarze@
2017-05-16Plug a memory leak. The main_cert needs to be X509_free()ed sinceClaudio Jeker
SSL_get_peer_certificate() increases the ref count whereas extra_certs do not because SSL_get_peer_cert_chain() won't increase ref counts. OK beck@
2017-05-15Typo: freezeo -> freezeroTheo Buehler
From "fenderq" on freenode via tj@
2017-05-13- fix bug wrt posix_memalign(3) of blocks between half a page and a pageOtto Moerbeek
- document posix_memalign() does not play nice with reacallocarray(3) and freezero(3)
2017-05-11Fix a problem introduced in freezero() conversion and useJonathan Gray
sizeof(struct) not sizeof(pointer). otto@ points out that on OpenBSD currently freezero() would have still zeroed the entire allocation, but this is not documented behaviour and may change in future. ok tom@