-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

===========================================================================
             AUSCERT External Security Bulletin Redistribution

                               ESB-2016.1094
                     Multiple OpenSSL vulnerabilities
                                5 May 2016

===========================================================================

        AusCERT Security Bulletin Summary
        ---------------------------------

Product:           openssl
Publisher:         FreeBSD
Operating System:  FreeBSD
Impact/Access:     Execute Arbitrary Code/Commands -- Remote/Unauthenticated
                   Access Privileged Data          -- Remote/Unauthenticated
                   Denial of Service               -- Remote/Unauthenticated
                   Provide Misleading Information  -- Remote/Unauthenticated
Resolution:        Patch/Upgrade
CVE Names:         CVE-2016-2176 CVE-2016-2109 CVE-2016-2107
                   CVE-2016-2106 CVE-2016-2105 

Reference:         ESB-2016.1076

Original Bulletin: 
   https://security.freebsd.org/advisories/FreeBSD-SA-16:17.openssl.asc

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

- -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

=============================================================================
FreeBSD-SA-16:17.openssl                                    Security Advisory
                                                          The FreeBSD Project

Topic:          Multiple OpenSSL vulnerabilities

Category:       contrib
Module:         openssl
Announced:      2016-05-04
Credits:        OpenSSL Project
Affects:        All supported versions of FreeBSD.
Corrected:      2016-05-03 18:54:20 UTC (stable/10, 10.3-STABLE)
                2016-05-04 15:25:47 UTC (releng/10.3, 10.3-RELEASE-p2)
                2016-05-04 15:26:23 UTC (releng/10.2, 10.2-RELEASE-p16)
                2016-05-04 15:27:09 UTC (releng/10.1, 10.1-RELEASE-p33)
                2016-05-04 06:53:02 UTC (stable/9, 9.3-STABLE)
                2016-05-04 15:27:09 UTC (releng/9.3, 9.3-RELEASE-p41)
CVE Name:       CVE-2016-2105, CVE-2016-2106, CVE-2016-2107, CVE-2016-2109,
                CVE-2016-2176

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

The padding check in AES-NI CBC MAC was rewritten to be in constant time
by making sure that always the same bytes are read and compared against
either the MAC or padding bytes. But it no longer checked that there was
enough data to have both the MAC and padding bytes. [CVE-2016-2107]

An overflow can occur in the EVP_EncodeUpdate() function which is used for
Base64 encoding of binary data. [CVE-2016-2105]

An overflow can occur in the EVP_EncryptUpdate() function, however it is
believed that there can be no overflows in internal code due to this problem.
[CVE-2016-2106]

When ASN.1 data is read from a BIO using functions such as d2i_CMS_bio()
a short invalid encoding can casuse allocation of large amounts of memory
potentially consuming excessive resources or exhausting memory.
[CVE-2016-2109]

ASN1 Strings that are over 1024 bytes can cause an overread in applications
using the X509_NAME_oneline() function on EBCDIC systems. [CVE-2016-2176]
FreeBSD does not run on any EBCDIC systems and therefore is not affected.

III. Impact

A MITM attacker can use a padding oracle attack to decrypt traffic
when the connection uses an AES CBC cipher and the server support
AES-NI. [CVE-2016-2107]

If an attacker is able to supply very large amounts of input data then a
length check can overflow resulting in a heap corruption. [CVE-2016-2105]

Any application parsing untrusted data through d2i BIO functions are vulnerable
to memory exhaustion attack. [CVE-2016-2109]  TLS applications are not affected.

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 daemons that use 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 daemons that use 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 10.x]
# fetch https://security.FreeBSD.org/patches/SA-16:17/openssl-10.patch
# fetch https://security.FreeBSD.org/patches/SA-16:17/openssl-10.patch.asc
# gpg --verify openssl-10.patch.asc

[FreeBSD 9.3]
# fetch https://security.FreeBSD.org/patches/SA-16:17/openssl-9.patc
# fetch https://security.FreeBSD.org/patches/SA-16:17/openssl-9.patch.asc
# gpg --verify openssl-9.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 daemons that use 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/                                                         r299053
releng/9.3/                                                       r299068
stable/10/                                                        r298999
releng/10.1/                                                      r299068
releng/10.2/                                                      r299067
releng/10.3/                                                      r299066
- - -------------------------------------------------------------------------

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:

<URL:https://svnweb.freebsd.org/base?view=revision&revision=NNNNNN>

VII. References

<URL:https://www.openssl.org/news/secadv/20160503.txt>

<URL:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-2105>

<URL:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-2106>

<URL:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-2107>

<URL:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-2109>

<URL:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-2176>

The latest revision of this advisory is available at
<URL:https://security.FreeBSD.org/advisories/FreeBSD-SA-16:17.openssl.asc>
- -----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJXKjuIAAoJEO1n7NZdz2rneZoP/jqsWr9q5MkCel2aZzfmSVhU
8CjzPwm3t48ibZqrkolAak4dbjJGhidUM/S83BvIcCdtKWyoG8D0fzemB7bBIP2L
fqvd1314vuy82CgZlAyJIqzokckUPfyHhTAz9FPZW46f8A+s8znzJcaaD81tt1Xe
qg9JZ61e2DZJ2NdZSJSjOpBl55gZqQq3tIwGYw027GKjiflJSvOG1n/531R4rppI
x0IZpLor7XBWuiC44hPc4yasC4khWzmdaRpqcUoWVEex8g6Il6xByS2o4AgX7kE/
NBZ0mj4IMYZNQW4VUYbnkmLtWXJYYScboBKh4FRljNCG/t5u/YoSfOY8SbS9LT9K
KVj56C6tQRq+/frKbPt26HbqqRTFNVn3FKxJWNQ9CLzsebobXPUYATTN2NVC8gkj
S0A/lT2xnvA2YqB9HfmHOvlHS2LDv8SivJWNK4dCPOwhVm624H4qH/N+VFcwU7zc
ue+BPvDYU/czsyoJDdQoWxTdkreaOY6eLAWkYAh9dEDIkZSOxgsZR7C4th6THXMu
ybIy544elc3bf9vS4tGR552Wi9VntE0B1/LJ2la8l+MnYE6qZL1hbAYpvNyuPWVP
EDPjOc4inaMpV62fuL1UrKH1g1HMmFUnoWhC70iS+cuLeXWFdvwBFyL420Ixkd5H
zvcsfJCrazlcZ6j83Qfd
=PGTh
- -----END PGP SIGNATURE-----

- --------------------------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:

        http://www.auscert.org.au/render.html?cid=1980

===========================================================================
Australian Computer Emergency Response Team
The University of Queensland
Brisbane
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.
===========================================================================
-----BEGIN PGP SIGNATURE-----
Comment: http://www.auscert.org.au/render.html?it=1967

iQIVAwUBVyqm3H6ZAP0PgtI9AQJ5rg/6AgiKyrciiEMf/iwvxQa/XYU/ly0IWBKN
VfeMo/R9i/1gzGRZ3LFhUrDg9uFFgZKmqEGvRNqDhCRhKEK02dLUpN/3mN6Y2sVH
mAv9A8Na223cnUtF/lmwZygbHmmeQhqOmq7aSRNsCgFtT6d9kG6MS7HoVBA1GkgV
dmFgdBcq1HYlNpSIfYfFVoWI56T2dRo75JvcXqtb+EzujRy1bvJCCWsyWVsg253w
0rQ1M3uG/GyVF2wsMZO7xpj8HWcRZMAcyZCW4lMwLh8Jo1URdqdp418BovWKr81+
Dm+JugruwdxM4CKtW9xPSoUB1CVesRA3Npa9ubhxGgaoSuiQT0p7JLIB7UlSqow0
7L+CTBxGPf0rKbs9StWB4YN0vEi81OsAzZrpPKcIvYdL3MuoRTHtf38AJFfRwCl7
v0ETl36bx5tE8yioLvu95C+TdUkSbU/ctvoc0VQrSe9JghuH9CKM12PciItyaIpo
E1iqXY0A6hJoB59RazFe9UJvpdGVHRdqGdsbu+XrsMX5J4tWvaZWGfj225oDhWpZ
hDlA7gcfRImA4soNiijcSDtDSa+qOHLfVNLMGArGy5SED1mRIYIhReejwuLAYU+X
jbX/6E67ePtv40FLeIl+midemZ7WJ/BSkrbvjk2p2Y4TAyd5Z8GRU9APZw2IrHqJ
+GdMqUMPd6c=
=N8c0
-----END PGP SIGNATURE-----