PolarSSL 'asn1_get_sequence_of' Function Uninitialized Pointer RCE

critical Nessus Plugin ID 81047

Synopsis

The remote SSL server is vulnerable to remote code execution.

Description

PolarSSL contains a flaw when parsing ASN.1 sequences from X.509 certificates due to freeing an uninitialized pointer by the function 'asn1_get_sequence_of' within file 'asn1parse.c'. An unauthenticated, remote attacker, using a specially crafted certificate, can exploit this flaw to cause a denial of service or execute arbitrary code.

This plugin sends client certificates with an X.509 Extended Key Usage extension that contains a malformed key purpose OID. PolarSSL allocates a 'asn1_sequence' structure to store the OID. For this plugin to work, the following conditions must be met :

- (1) The 'next' field of the allocated 'asn_sequence' structure for the malformed key purpose OID must be non-zero.

- (2) The SSL server requests a client certificate.

Solution

Follow the instructions in the vendor advisory.

See Also

http://www.nessus.org/u?8e6caee6

https://www.certifiedsecure.com/polarssl-advisory/

Plugin Details

Severity: Critical

ID: 81047

File Name: polarssl_cve-2015-1182.nasl

Version: 1.21

Type: remote

Family: General

Published: 1/28/2015

Updated: 4/11/2022

Configuration: Enable thorough checks

Supported Sensors: Nessus

Risk Information

VPR

Risk Factor: Medium

Score: 6.5

CVSS v2

Risk Factor: High

Base Score: 7.5

Temporal Score: 5.5

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

CVSS Score Source: CVE-2015-1182

CVSS v3

Risk Factor: Critical

Base Score: 10

Temporal Score: 8.7

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

Temporal Vector: CVSS:3.0/E:U/RL:O/RC:C

Vulnerability Information

CPE: cpe:/a:polarssl:polarssl

Required KB Items: SSL/Supported

Exploit Ease: No known exploits are available

Patch Publication Date: 1/19/2015

Vulnerability Publication Date: 1/19/2015

Reference Information

CVE: CVE-2015-1182