Hash: SHA1

             AUSCERT External Security Bulletin Redistribution

                     Multiple OpenSSL vulnerabilities
                               11 March 2016


        AusCERT Security Bulletin Summary

Product:           openssl
Publisher:         FreeBSD
Operating System:  FreeBSD
Impact/Access:     Access Privileged Data -- Remote/Unauthenticated
                   Denial of Service      -- Remote/Unauthenticated
Resolution:        Patch/Upgrade
CVE Names:         CVE-2016-0800 CVE-2016-0799 CVE-2016-0798
                   CVE-2016-0797 CVE-2016-0705 CVE-2016-0704
                   CVE-2016-0703 CVE-2016-0702 

Reference:         ASB-2016.0019

Original Bulletin: 

- --------------------------BEGIN INCLUDED TEXT--------------------

Hash: SHA512

FreeBSD-SA-16:12.openssl                                    Security Advisory
                                                          The FreeBSD Project

Topic:          Multiple OpenSSL vulnerabilities

Category:       contrib
Module:         openssl
Announced:      2016-03-10
Credits:        OpenSSL Project
Affects:        All supported versions of FreeBSD.
Corrected:      2016-03-04 00:40:15 UTC (stable/10, 10.2-BETA3)
                2016-03-03 07:30:55 UTC (releng/10.2, 10.2-RELEASE-p13)
                2016-03-03 07:30:55 UTC (releng/10.1, 10.1-RELEASE-p30)
                2016-03-10 03:58:48 UTC (stable/9, 9.3-STABLE)
                2016-03-10 10:03:28 UTC (releng/9.3, 9.3-RELEASE-p38)
CVE Name:       CVE-2016-0702, CVE-2016-0703, CVE-2016-0704, CVE-2016-0705
                CVE-2016-0797, CVE-2016-0798, CVE-2016-0799, CVE-2016-0800

For general information regarding FreeBSD Security Advisories,
including descriptions of the fields above, security branches, and the
following sections, please visit <URL:https://security.FreeBSD.org/>.

I.   Background

FreeBSD includes software from the OpenSSL Project.  The OpenSSL Project is
a collaborative effort to develop a robust, commercial-grade, full-featured
Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3)
and Transport Layer Security (TLS v1) protocols as well as a full-strength
general purpose cryptography library.

II.  Problem Description

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 POP3) shares the RSA keys of the non-vulnerable server.  This vulnerability
is known as DROWN.  [CVE-2016-0800]

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.  [CVE-2016-0705]

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.  [CVE-2016-0798]

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 pointer dereference.  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.  [CVE-2016-0797]

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

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. [CVE-2016-0702]

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.  [CVE-2016-0703]

s2_srvr.c overwrites the wrong bytes in the master key when applying
Bleichenbacher protection for export cipher suites.  [CVE-2016-0704]

III. Impact

Servers that have SSLv2 protocol enabled are vulnerable to the "DROWN" attack
which allows a remote attacker to fast attack many recorded TLS connections
made to the server, even when the client did not make any SSLv2 connections

An attacker who can supply malformed DSA private keys to OpenSSL applications
may be able to cause memory corruption which would lead to a Denial of
Service condition. [CVE-2016-0705]

An attacker connecting with an invalid username can cause memory leak, which
could eventually lead to a Denial of Service condition. [CVE-2016-0798]

An attacker who can inject malformed data into an application may be able
to cause memory corruption which would lead to a Denial of Service
condition. [CVE-2016-0797, CVE-2016-0799]

A local attacker who has control of code in a thread running on the same
hyper-threaded core as the victim thread which is performing decryptions
could recover RSA keys. [CVE-2016-0702]

An eavesdropper who can intercept SSLv2 handshake can conduct an efficient
divide-and-conquer key recovery attack and use the server as an oracle to
determine the SSLv2 master-key, using only 16 connections to the server
and negligible computation.  [CVE-2016-0703]

An attacker can use the Bleichenbacher oracle,  which enables more efficient
variant of the DROWN attack.  [CVE-2016-0704]

IV.  Workaround

No workaround is available.

V.   Solution

Perform one of the following:

1) Upgrade your vulnerable system to a supported FreeBSD stable or
release / security branch (releng) dated after the correction date.

Restart all deamons using the library, or reboot the system.

2) To update your vulnerable system via a binary patch:

Systems running a RELEASE version of FreeBSD on the i386 or amd64
platforms can be updated via the freebsd-update(8) utility:

# freebsd-update fetch
# freebsd-update install

Restart all deamons using the library, or reboot the system.

3) To update your vulnerable system via a source code patch:

The following patches have been verified to apply to the applicable
FreeBSD release branches.

a) Download the relevant patch from the location below, and verify the
detached PGP signature using your PGP utility.

[FreeBSD 9.3]
# fetch https://security.FreeBSD.org/patches/SA-16:12/openssl-9.3.patch.xz
# fetch https://security.FreeBSD.org/patches/SA-16:12/openssl-9.3.patch.xz.asc
# gpg --verify openssl-9.3.patch.xz.asc

Note that the initial patch version contains a serious regression that
would lead to crash.  The following patch must be applied to address it.

# fetch https://security.FreeBSD.org/patches/SA-16:12/openssl-9.3-fix.patch
# fetch https://security.FreeBSD.org/patches/SA-16:12/openssl-9.3-fix.patch.asc
# gpg --verify openssl-9.3-fix.patch.asc

[FreeBSD 10.1]
# fetch https://security.FreeBSD.org/patches/SA-16:12/openssl-10.1.patch.xz
# fetch https://security.FreeBSD.org/patches/SA-16:12/openssl-10.1.patch.xz.asc
# gpg --verify openssl-10.1.patch.xz.asc

[FreeBSD 10.2]
# fetch https://security.FreeBSD.org/patches/SA-16:12/openssl-10.2.patch
# fetch https://security.FreeBSD.org/patches/SA-16:12/openssl-10.2.patch.asc
# gpg --verify openssl-10.2.patch.asc

b) Apply the patch.  Execute the following commands as root:

# cd /usr/src
# patch < /path/to/patch

c) Recompile the operating system using buildworld and installworld as
described in <URL:https://www.FreeBSD.org/handbook/makeworld.html>.

Restart all deamons using the library, or reboot the system.

VI.  Correction details

The following list contains the correction revision numbers for each
affected branch.

Branch/path                                                      Revision
- - -------------------------------------------------------------------------
stable/9/                                                         r296598
releng/9.3/                                                       r296611
stable/10/                                                        r296371
releng/10.1/                                                      r296341
releng/10.2/                                                      r296341
- - -------------------------------------------------------------------------

To see which files were modified by a particular revision, run the
following command, replacing NNNNNN with the revision number, on a
machine with Subversion installed:

# svn diff -cNNNNNN --summarize svn://svn.freebsd.org/base

Or visit the following URL, replacing NNNNNN with the revision number:


VII. References










The latest revision of this advisory is available at
Version: GnuPG v2.1.11 (FreeBSD)


- --------------------------END INCLUDED TEXT--------------------

You have received this e-mail bulletin as a result of your organisation's
registration with AusCERT. The mailing list you are subscribed to is
maintained within your organisation, so if you do not wish to continue
receiving these bulletins you should contact your local IT manager. If
you do not know who that is, please send an email to auscert@auscert.org.au
and we will forward your request to the appropriate person.

NOTE: Third Party Rights
This security bulletin is provided as a service to AusCERT's members.  As
AusCERT did not write the document quoted above, AusCERT has had no control
over its content. The decision to follow or act on information or advice
contained in this security bulletin is the responsibility of each user or
organisation, and should be considered in accordance with your organisation's
site policies and procedures. AusCERT takes no responsibility for consequences
which may arise from following or acting on information or advice contained in
this security bulletin.

NOTE: This is only the original release of the security bulletin.  It may
not be updated when updates to the original are made.  If downloading at
a later date, it is recommended that the bulletin is retrieved directly
from the author's website to ensure that the information is still current.

Contact information for the authors of the original document is included
in the Security Bulletin above.  If you have any questions or need further
information, please contact them directly.

Previous advisories and external security bulletins can be retrieved from:


Australian Computer Emergency Response Team
The University of Queensland
Qld 4072

Internet Email: auscert@auscert.org.au
Facsimile:      (07) 3365 7031
Telephone:      (07) 3365 4417 (International: +61 7 3365 4417)
                AusCERT personnel answer during Queensland business hours
                which are GMT+10:00 (AEST).
                On call after hours for member emergencies only.
Comment: http://www.auscert.org.au/render.html?it=1967