Commit Graph

241150 Commits

Author SHA1 Message Date
ozaki-r
be7deda7eb Add tests for tap(4) 2016-03-04 02:44:45 +00:00
nat
ff18370b0b Center game board on screen. OK from christos@. 2016-03-03 21:38:55 +00:00
palle
80fa20e7c1 sun4v: rft_kernel should pay attention to the number of register windows that can be restored. We cannot rely on fill traps to occur, since sun4v only has two trap levels available in privileged mode. Based on code from OpenBSD. ok martin@ 2016-03-03 20:45:45 +00:00
skrll
8142c3d9b6 Get the RPI3 working (in aarch32 mode) by recognising Cortex A53 CPUs.
While I'm here add some A57/A72 info as well.

My RPI3 works with FB console - the uart needs some help with its clocks.
2016-03-03 17:01:31 +00:00
uwe
705ce573e4 Don't leak garabage from the kernel stack on sleep(0) and equivalents.
Hat tip to perl's ext/POSIX/t/wrappers.t
2016-03-03 01:39:17 +00:00
christos
42418d20f1 fix indent 2016-03-02 19:28:56 +00:00
christos
d600a25056 PR/50883: David Binderman: Remove redundant code. 2016-03-02 19:27:05 +00:00
christos
4387d8ea3a PR/50882: David Binderman: Remove redundant code. 2016-03-02 19:26:15 +00:00
christos
179eb6b78f PR/50881: David Binderman: Remove redundant code. 2016-03-02 19:25:32 +00:00
christos
d784c57539 PR/50880: David Binderman: Remove redundant code.
While here, fix all debugging formats.
2016-03-02 19:24:20 +00:00
christos
fa7bb8d201 PR/50879: David Binderman: remove redundant code. 2016-03-02 19:11:28 +00:00
martin
04a908fefc David Binderman in PR bin/50884: simplify boolean expression 2016-03-02 19:03:31 +00:00
christos
61a6f3b1eb new openssl 2016-03-02 01:54:19 +00:00
christos
8fee458757 bump OpenSSL for 1.0.1s (remove SSLv2 and weak "export" ciphers) 2016-03-02 01:53:21 +00:00
christos
338c254400 merge conflicts, bump libraries to 11 for consistency. 2016-03-02 01:52:35 +00:00
christos
603f28d89d remove comment I used to test. 2016-03-01 21:45:10 +00:00
christos
f485d9df89 Build as PIC if requested 2016-03-01 21:30:40 +00:00
martin
5902f7d619 Fix wrong condition in previous causing bogus 'Use "exit" to leave
shell.' messages (from kre)
2016-03-01 21:10:40 +00:00
joerg
2f04f4ac92 Don't crash when relocbase was 0. 2016-03-01 21:09:17 +00:00
christos
4fa8c26b73 OpenSSL Security Advisory [1st March 2016]
=========================================

NOTE: With this update, OpenSSL is disabling the SSLv2 protocol by default, as
well as removing SSLv2 EXPORT ciphers.  We strongly advise against the use of
SSLv2 due not only to the issues described below, but to the other known
deficiencies in the protocol as described at
https://tools.ietf.org/html/rfc6176


Cross-protocol attack on TLS using SSLv2 (DROWN) (CVE-2016-0800)
================================================================

Severity: High

A cross-protocol attack was discovered that could lead to decryption of TLS
sessions by using a server supporting SSLv2 and EXPORT cipher suites as a
Bleichenbacher RSA padding oracle.  Note that traffic between clients and
non-vulnerable servers can be decrypted provided another server supporting
SSLv2 and EXPORT ciphers (even with a different protocol such as SMTP, IMAP or
POP) shares the RSA keys of the non-vulnerable server. This vulnerability is
known as DROWN (CVE-2016-0800).

Recovering one session key requires the attacker to perform approximately 2^50
computation, as well as thousands of connections to the affected server. A more
efficient variant of the DROWN attack exists against unpatched OpenSSL servers
using versions that predate 1.0.2a, 1.0.1m, 1.0.0r and 0.9.8zf released on
19/Mar/2015 (see CVE-2016-0703 below).

Users can avoid this issue by disabling the SSLv2 protocol in all their SSL/TLS
servers, if they've not done so already. Disabling all SSLv2 ciphers is also
sufficient, provided the patches for CVE-2015-3197 (fixed in OpenSSL 1.0.1r and
1.0.2f) have been deployed.  Servers that have not disabled the SSLv2 protocol,
and are not patched for CVE-2015-3197 are vulnerable to DROWN even if all SSLv2
ciphers are nominally disabled, because malicious clients can force the use of
SSLv2 with EXPORT ciphers.

OpenSSL 1.0.2g and 1.0.1s deploy the following mitigation against DROWN:

SSLv2 is now by default disabled at build-time.  Builds that are not configured
with "enable-ssl2" will not support SSLv2.  Even if "enable-ssl2" is used,
users who want to negotiate SSLv2 via the version-flexible SSLv23_method() will
need to explicitly call either of:

   SSL_CTX_clear_options(ctx, SSL_OP_NO_SSLv2);
   or
   SSL_clear_options(ssl, SSL_OP_NO_SSLv2);

as appropriate.  Even if either of those is used, or the application explicitly
uses the version-specific SSLv2_method() or its client or server variants,
SSLv2 ciphers vulnerable to exhaustive search key recovery have been removed.
Specifically, the SSLv2 40-bit EXPORT ciphers, and SSLv2 56-bit DES are no
longer available.

In addition, weak ciphers in SSLv3 and up are now disabled in default builds of
OpenSSL.  Builds that are not configured with "enable-weak-ssl-ciphers" will
not provide any "EXPORT" or "LOW" strength ciphers.

OpenSSL 1.0.2 users should upgrade to 1.0.2g
OpenSSL 1.0.1 users should upgrade to 1.0.1s

This issue was reported to OpenSSL on December 29th 2015 by Nimrod Aviram and
Sebastian Schinzel. The fix was developed by Viktor Dukhovni and Matt Caswell
of OpenSSL.


Double-free in DSA code (CVE-2016-0705)
=======================================

Severity: Low

A double free bug was discovered when OpenSSL parses malformed DSA private keys
and could lead to a DoS attack or memory corruption for applications that
receive DSA private keys from untrusted sources.  This scenario is considered
rare.

This issue affects OpenSSL versions 1.0.2 and 1.0.1.

OpenSSL 1.0.2 users should upgrade to 1.0.2g
OpenSSL 1.0.1 users should upgrade to 1.0.1s

This issue was reported to OpenSSL on February 7th 2016 by Adam Langley
(Google/BoringSSL) using libFuzzer. The fix was developed by Dr Stephen Henson
of OpenSSL.


Memory leak in SRP database lookups (CVE-2016-0798)
===================================================

Severity: Low

The SRP user database lookup method SRP_VBASE_get_by_user had
confusing memory management semantics; the returned pointer was sometimes newly
allocated, and sometimes owned by the callee. The calling code has no way of
distinguishing these two cases.

Specifically, SRP servers that configure a secret seed to hide valid
login information are vulnerable to a memory leak: an attacker
connecting with an invalid username can cause a memory leak of around
300 bytes per connection.  Servers that do not configure SRP, or
configure SRP but do not configure a seed are not vulnerable.

In Apache, the seed directive is known as SSLSRPUnknownUserSeed.

To mitigate the memory leak, the seed handling in
SRP_VBASE_get_by_user is now disabled even if the user has configured
a seed.  Applications are advised to migrate to
SRP_VBASE_get1_by_user. However, note that OpenSSL makes no strong
guarantees about the indistinguishability of valid and invalid
logins. In particular, computations are currently not carried out in
constant time.

This issue affects OpenSSL versions 1.0.2 and 1.0.1.

OpenSSL 1.0.2 users should upgrade to 1.0.2g
OpenSSL 1.0.1 users should upgrade to 1.0.1s

This issue was discovered on February 23rd 2016 by Emilia Käsper of
the OpenSSL development team. Emilia Käsper also developed the fix.


BN_hex2bn/BN_dec2bn NULL pointer deref/heap corruption (CVE-2016-0797)
======================================================================

Severity: Low

In the BN_hex2bn function the number of hex digits is calculated using an int
value |i|. Later |bn_expand| is called with a value of |i * 4|. For large values
of |i| this can result in |bn_expand| not allocating any memory because |i * 4|
is negative. This can leave the internal BIGNUM data field as NULL leading to a
subsequent NULL ptr deref. For very large values of |i|, the calculation |i * 4|
could be a positive value smaller than |i|. In this case memory is allocated to
the internal BIGNUM data field, but it is insufficiently sized leading to heap
corruption. A similar issue exists in BN_dec2bn. This could have security
consequences if BN_hex2bn/BN_dec2bn is ever called by user applications with
very large untrusted hex/dec data. This is anticipated to be a rare occurrence.

All OpenSSL internal usage of these functions use data that is not expected to
be untrusted, e.g. config file data or application command line arguments. If
user developed applications generate config file data based on untrusted data
then it is possible that this could also lead to security consequences. This is
also anticipated to be rare.

This issue affects OpenSSL versions 1.0.2 and 1.0.1.

OpenSSL 1.0.2 users should upgrade to 1.0.2g
OpenSSL 1.0.1 users should upgrade to 1.0.1s

This issue was reported to OpenSSL on February 19th 2016 by Guido Vranken.  The
fix was developed by Matt Caswell of the OpenSSL development team.

Fix memory issues in BIO_*printf functions (CVE-2016-0799)
==========================================================

Severity: Low

The internal |fmtstr| function used in processing a "%s" format string in the
BIO_*printf functions could overflow while calculating the length of a string
and cause an OOB read when printing very long strings.

Additionally the internal |doapr_outch| function can attempt to write to an OOB
memory location (at an offset from the NULL pointer) in the event of a memory
allocation failure. In 1.0.2 and below this could be caused where the size of a
buffer to be allocated is greater than INT_MAX. E.g. this could be in processing
a very long "%s" format string. Memory leaks can also occur.

The first issue may mask the second issue dependent on compiler behaviour.
These problems could enable attacks where large amounts of untrusted data is
passed to the BIO_*printf functions. If applications use these functions in this
way then they could be vulnerable. OpenSSL itself uses these functions when
printing out human-readable dumps of ASN.1 data. Therefore applications that
print this data could be vulnerable if the data is from untrusted sources.
OpenSSL command line applications could also be vulnerable where they print out
ASN.1 data, or if untrusted data is passed as command line arguments.

Libssl is not considered directly vulnerable. Additionally certificates etc
received via remote connections via libssl are also unlikely to be able to
trigger these issues because of message size limits enforced within libssl.

This issue affects OpenSSL versions 1.0.2 and 1.0.1.

OpenSSL 1.0.2 users should upgrade to 1.0.2g
OpenSSL 1.0.1 users should upgrade to 1.0.1s

This issue was reported to OpenSSL on February 23rd by Guido Vranken.  The
fix was developed by Matt Caswell of the OpenSSL development team.

Side channel attack on modular exponentiation (CVE-2016-0702)
=============================================================

Severity: Low

A side-channel attack was found which makes use of cache-bank conflicts on the
Intel Sandy-Bridge microarchitecture which could lead to the recovery of RSA
keys.  The ability to exploit this issue is limited as it relies on an attacker
who has control of code in a thread running on the same hyper-threaded core as
the victim thread which is performing decryptions.

This issue affects OpenSSL versions 1.0.2 and 1.0.1.

OpenSSL 1.0.2 users should upgrade to 1.0.2g
OpenSSL 1.0.1 users should upgrade to 1.0.1s

This issue was reported to OpenSSL on Jan 8th 2016 by Yuval Yarom, The
University of Adelaide and NICTA, Daniel Genkin, Technion and Tel Aviv
University, and Nadia Heninger, University of Pennsylvania with more
information at http://cachebleed.info.  The fix was developed by Andy Polyakov
of OpenSSL.


Divide-and-conquer session key recovery in SSLv2 (CVE-2016-0703)
================================================================

Severity: High

This issue only affected versions of OpenSSL prior to March 19th 2015 at which
time the code was refactored to address vulnerability CVE-2015-0293.

s2_srvr.c did not enforce that clear-key-length is 0 for non-export ciphers. If
clear-key bytes are present for these ciphers, they *displace* encrypted-key
bytes. This leads to an efficient divide-and-conquer key recovery attack: if an
eavesdropper has intercepted an SSLv2 handshake, they can use the server as an
oracle to determine the SSLv2 master-key, using only 16 connections to the
server and negligible computation.

More importantly, this leads to a more efficient version of DROWN that is
effective against non-export ciphersuites, and requires no significant
computation.

This issue affected OpenSSL versions 1.0.2, 1.0.1l, 1.0.0q, 0.9.8ze and all
earlier versions.  It was fixed in OpenSSL 1.0.2a, 1.0.1m, 1.0.0r and 0.9.8zf
(released March 19th 2015).

This issue was reported to OpenSSL on February 10th 2016 by David Adrian and J.
Alex Halderman of the University of Michigan.  The underlying defect had by
then already been fixed by Emilia Käsper of OpenSSL on March 4th 2015.  The fix
for this issue can be identified by commits ae50d827 (1.0.2a), cd56a08d
(1.0.1m), 1a08063 (1.0.0r) and 65c588c (0.9.8zf).


Bleichenbacher oracle in SSLv2 (CVE-2016-0704)
==============================================

Severity: Moderate

This issue only affected versions of OpenSSL prior to March 19th 2015 at which
time the code was refactored to address the vulnerability CVE-2015-0293.

s2_srvr.c overwrite the wrong bytes in the master-key when applying
Bleichenbacher protection for export cipher suites.  This provides a
Bleichenbacher oracle, and could potentially allow more efficient variants of
the DROWN attack.

This issue affected OpenSSL versions 1.0.2, 1.0.1l, 1.0.0q, 0.9.8ze and all
earlier versions.  It was fixed in OpenSSL 1.0.2a, 1.0.1m, 1.0.0r and 0.9.8zf
(released March 19th 2015).

This issue was reported to OpenSSL on February 10th 2016 by David Adrian and J.
Alex Halderman of the University of Michigan.  The underlying defect had by
then already been fixed by Emilia Käsper of OpenSSL on March 4th 2015.  The fix
for this issue can be identified by commits ae50d827 (1.0.2a), cd56a08d
(1.0.1m), 1a08063 (1.0.0r) and 65c588c (0.9.8zf).

Note
====

As per our previous announcements and our Release Strategy
(https://www.openssl.org/policies/releasestrat.html), support for OpenSSL
version 1.0.1 will cease on 31st December 2016. No security updates for that
version will be provided after that date. Users of 1.0.1 are advised to
upgrade.

Support for versions 0.9.8 and 1.0.0 ended on 31st December 2015. Those
versions are no longer receiving security updates.

References
==========

URL for this Security Advisory:
https://www.openssl.org/news/secadv/20160301.txt

Note: the online version of the advisory may be updated with additional details
over time.

For details of OpenSSL severity classifications please see:
https://www.openssl.org/policies/secpolicy.html
2016-03-01 21:00:52 +00:00
joerg
a542f58193 Don't reuse LDFLAGS for arguments passed directly to ${LD}, share/mk
expects it to be passed to ${CC} or ${CXX}, so they will generally
prefix flags with -Wl.
2016-03-01 16:08:22 +00:00
joerg
f2e47b4038 Merge r274564 from FreeBSD:
Fix a couple of bugs around the handling of structs and unions of size zero.
These would cause ctfconvert(1) to return an error when attempting to
resolve valid C types.
2016-03-01 14:52:14 +00:00
christos
06f9bef68e Improved handling of TEST_SH so that it is possible to define it
to the name of a shell, plus options that shell needs to run it
in the correct mode to be tested: eg: TEST_SH='bash -o posix'
Also finished the implementation of tests of "set -n" now that
the NetBSD shell supports that as it should. (from kre)
2016-03-01 12:39:35 +00:00
uwe
ce76f88f8f Switch sh3 to the new binutils and gdb. Lightly tested on landisk.
sh3eb compile-tested only.
2016-03-01 10:29:40 +00:00
martin
7493d9dc28 Remove regexp.h here temporarily 2016-03-01 10:11:07 +00:00
martin
7263822890 Revert to rev 1.77 for now on Aymeric's request 2016-03-01 10:09:00 +00:00
aymeric
978d3464f5 remove regsub.c from the list of files to build because it unbreaks the build
and this API is not yet endorsed. OK christos@
2016-03-01 06:48:55 +00:00
christos
1843eb8cb0 more tests from kre 2016-02-29 23:52:53 +00:00
christos
476468ab31 Even more debugging improvements (from kre) 2016-02-29 23:52:04 +00:00
christos
a584b40f8d Complete implementation of the noexec option (-n) including
disabling noexec, if the shell is interactive, each time that
a new command is about to be read.  Also correct the -I
(ignoreeof) option so that it only applies to interactive shells,
as required by posix. (from kre)
2016-02-29 23:51:36 +00:00
christos
8cfa226b64 delete clauses 3,4 2016-02-29 23:50:59 +00:00
aymeric
70262961bc mention that the recent addition of the NetBSD implementation of regexps
to libnbcompat may lead to crashes in tools using them on non-NetBSD hosts
if these are not rebuilt from scratch.
2016-02-29 22:49:11 +00:00
aymeric
90b3c9835b add our libc's regex implementation to libnbcompat.
This way, nbsed picks it up and it unbreaks the build of xf86-video-intel-old's
man page under Linux and probably other future changes which rightfully expect
the (net)bsd behaviour.
2016-02-29 22:19:29 +00:00
aymeric
904c2b2729 protect __RCSID the same way other reg*.c files do, so that we can use this
file in libnbcompat
2016-02-29 22:10:13 +00:00
riastradh
85663e08a5 Tag ctf.5 man page with ctf, not dtrace. 2016-02-29 22:01:20 +00:00
riastradh
17ca604b7a Skip libctf if MKCTF=no irrespective of MKDTRACE, for real.
Apparently this logic is copied in lib/Makefile and in
external/cddl/osnet/lib/Makefile.  Is the latter even used?
2016-02-29 20:59:35 +00:00
christos
73a99c19aa PR/50867: David Binderman: Fix parsing loop.
While here, modernize error handling, merge copy and pasted code.
2016-02-29 18:59:52 +00:00
christos
b2e81b86bb PR/50868: David Binderman: Fix operator precedence. 2016-02-29 18:25:29 +00:00
christos
3aca3860f9 PR/50869: David Binderman: Use logical and instead of arithmetic 2016-02-29 18:24:31 +00:00
christos
13e9c85cdc PR/50870: David Binderman: Use logical and instead of arithmetic 2016-02-29 18:22:06 +00:00
christos
bad095e351 PR/50872: David Binderman: Use logical and instead of arithmetic 2016-02-29 18:21:15 +00:00
christos
4a89ac6a7b PR/50871: David Binderman: use logical and instead of arithmetic 2016-02-29 18:20:31 +00:00
christos
bfc1db599b PR/50873: David Binderman: use logical or instead of arithmetic 2016-02-29 18:19:46 +00:00
christos
a2f023e884 PR/50874: David Binderman: unsigned can't be negative 2016-02-29 18:18:04 +00:00
riastradh
a37e72fe0d Let MKCTF alone control whether we build libctf.
If MKDTRACE=yes MKCTF=no makes no sense, we can express that
somewhere else, not as a confusing set lists error at the end -- as
far as I know, there's no way to express MKDTRACE *or* MKCTF as a
condition for set list entries.
2016-02-29 17:46:54 +00:00
riastradh
fdeab11495 #ifdef forward declaration of setpolicy like definition. 2016-02-29 16:25:06 +00:00
riastradh
ab04408fa8 Consistently use estrlcpy for ifr.ifr_name here, not strncpy. 2016-02-29 16:23:25 +00:00
riastradh
9e84fa00b8 uint64_t can't be negative. 2016-02-29 16:19:20 +00:00
riastradh
a9ebcda81c Sprinkle some more zfs range lock reference count kasserts.
From a debugging session months ago, might as well share them.
2016-02-29 16:18:37 +00:00
riastradh
25e09ac3be Record current raid configurations too in /etc/security. 2016-02-29 16:16:42 +00:00