The Vigil@nce team watches public vulnerabilities impacting your computers, and then offers security solutions, a vigilance database and tools to fix them.

Vulnerability of PHP: bypassing of X.509 subjectAltName check

Synthesis of the vulnerability 

An attacker can send an X.509 certificate containing a null byte to a client written in PHP in order to spoof another server.
Vulnerable systems: Debian, Fedora, HP-UX, openSUSE, Solaris, PHP, RHEL, Slackware, SUSE Linux Enterprise Desktop, SLES.
Severity of this threat: 2/4.
Creation date: 14/08/2013.
Références of this weakness: BID-61776, c04483248, CERTFR-2014-AVI-244, CVE-2013-4248, DSA-2742-1, FEDORA-2013-14985, FEDORA-2013-14998, HPSBUX03150, MDVSA-2013:221, MDVSA-2014:014, openSUSE-SU-2013:1963-1, openSUSE-SU-2013:1964-1, RHSA-2013:1307-01, RHSA-2013:1615-02, SSA:2013-242-02, SSRT101681, SUSE-SU-2014:0873-1, SUSE-SU-2014:0873-2, VIGILANCE-VUL-13280.

Description of the vulnerability 

An SSL client must check that the host name included in the certificate received from the server is the one of the targeted server.

The openssl_x509_parse() function of the OpenSSL extension of PHP performs this check, by calling the OpenSSL library. However, OpenSSL uses functions like sprintf(), which uses the null byte as a string terminator, which is the C convention. The X.509 subjectAltName comparison is thus restricted to the left substring before the null byte.

An attacker can therefore send an X.509 certificate containing a null byte to a client written in PHP in order to spoof another server.
Full bulletin, software filtering, emails, fixes, ... (Request your free trial)

This security bulletin impacts software or systems such as Debian, Fedora, HP-UX, openSUSE, Solaris, PHP, RHEL, Slackware, SUSE Linux Enterprise Desktop, SLES.

Our Vigil@nce team determined that the severity of this cybersecurity announce is medium.

The trust level is of type confirmed by the editor, with an origin of internet server.

A proof of concept or an attack tool is available, so your teams have to process this alert. An attacker with a specialist ability can exploit this vulnerability alert.

Solutions for this threat 

PHP: version 5.5.2.
The version 5.5.2 is fixed:
  http://www.php.net/downloads.php
The version 5.5.3 fixes a regression error.

PHP: version 5.4.18.
The version 5.4.18 is fixed:
  http://www.php.net/downloads.php
The version 5.4.19 fixes a regression error.

PHP: patch for X.509 subjectAltName.
A patch is available in information sources.

Debian: new php5 packages.
New packages are available:
  php5 5.3.3-7+squeeze17
  php5 5.4.4-14+deb7u4

Fedora: new php packages.
New packages are available:
  php-5.4.19-1.fc18
  php-5.5.3-1.fc19

HP-UX: patch for several vulnerabilities.
A patch is available:
  http://software.hp.com/
The whole list of patch is included in the HP announce.

Mandriva BS: new php packages (22/01/2014).
New packages are available:
  php-5.5.8-1.mbs1

Mandriva: new php packages (27/08/2013).
New packages are available:
  php-5.3.27-0.2mdvmes5.2
  php-5.3.27-1.2.mbs1

openSUSE: new php5 packages.
New packages are available:
  openSUSE 11.4 : php5-5.3.5-359.1
  openSUSE 12.2 : php5-5.3.15-1.20.1
  openSUSE 12.3 : php5-5.3.17-3.8.1
  openSUSE 13.1 : php5-5.4.20-4.1

RHEL 5: new php53 packages (01/10/2013).
New packages are available:
  php53-5.3.3-21.el5

RHEL 6: new php packages.
New packages are available:
  php-5.3.3-26.el6

Slackware: new php packages.
New packages are available:
ftp://ftp.slackware.com/pub/slackware/slackware-14.0/patches/packages/php-5.4.19-i486-1_slack14.0.txz
ftp://ftp.slackware.com/pub/slackware/slackware64-14.0/patches/packages/php-5.4.19-x86_64-1_slack14.0.txz

Solaris 11.1: version 11.1.17.5.0.
The version 11.1.17.5.0 is fixed:
  https://support.oracle.com/rs?type=doc&id=1637117.1

Solaris 11: version 11.1.19.6.0.
The version 11.1.19.6.0 is fixed:
  https://support.oracle.com/rs?type=doc&id=1673700.1

SUSE LE 10: new php5 packages.
New packages are available:
  SUSE LE 10: apache2-mod_php5 5.2.14-0.48.1, php5 5.2.14-0.48.1

SUSE LE 11 SP1: new php5 packages.
New packages are available:
  SUSE LE 11: apache2-mod_php5 5.2.14-0.7.30.54.1, php5 5.2.14-0.7.30.54.1
Full bulletin, software filtering, emails, fixes, ... (Request your free trial)

Computer vulnerabilities tracking service 

Vigil@nce provides an applications vulnerabilities note. The Vigil@nce team tracks computer vulnerabilities impacting systems and applications.