FreeBSD : PHP5 -- memory corruption in openssl_x509_parse() (47b4e713-6513-11e3-868f-0025905a4771)

high Nessus Plugin ID 71451

Synopsis

The remote FreeBSD host is missing one or more security-related updates.

Description

Stefan Esser reports :

The PHP function openssl_x509_parse() uses a helper function called asn1_time_to_time_t() to convert timestamps from ASN1 string format into integer timestamp values. The parser within this helper function is not binary safe and can therefore be tricked to write up to five NUL bytes outside of an allocated buffer.

This problem can be triggered by x509 certificates that contain NUL bytes in their notBefore and notAfter timestamp fields and leads to a memory corruption that might result in arbitrary code execution.

Depending on how openssl_x509_parse() is used within a PHP application the attack requires either a malicious cert signed by a compromised/malicious CA or can be carried out with a self-signed cert.

Solution

Update the affected packages.

See Also

http://www.nessus.org/u?c851f14b

http://www.nessus.org/u?3a0b0bfa

Plugin Details

Severity: High

ID: 71451

File Name: freebsd_pkg_47b4e713651311e3868f0025905a4771.nasl

Version: 1.5

Type: local

Published: 12/16/2013

Updated: 1/6/2021

Supported Sensors: Nessus

Risk Information

VPR

Risk Factor: Medium

Score: 6.7

CVSS v2

Risk Factor: High

Base Score: 7.5

Vector: CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P

Vulnerability Information

CPE: p-cpe:/a:freebsd:freebsd:php5, p-cpe:/a:freebsd:freebsd:php53, p-cpe:/a:freebsd:freebsd:php55, cpe:/o:freebsd:freebsd

Required KB Items: Host/local_checks_enabled, Host/FreeBSD/release, Host/FreeBSD/pkg_info

Patch Publication Date: 12/14/2013

Vulnerability Publication Date: 12/13/2013

Reference Information

CVE: CVE-2013-6420