NASM asm/labels.c null pointer dereference

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
4.2$0-$5k0.00

A vulnerability, which was classified as problematic, has been found in NASM (Programming Tool Software) (the affected version is unknown). Affected by this issue is an unknown code of the file asm/labels.c. The manipulation with an unknown input leads to a null pointer dereference vulnerability. Using CWE to declare the problem leads to CWE-476. A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. Impacted is availability. CVE summarizes:

asm/labels.c in Netwide Assembler (NASM) is prone to NULL Pointer Dereference, which allows the attacker to cause a denial of service via a crafted file.

The bug was discovered 09/05/2018. The weakness was published 09/06/2018 as Bug 3392513 as not defined bug report (Bugzilla). The advisory is shared for download at bugzilla.nasm.us. This vulnerability is handled as CVE-2018-16517 since 09/05/2018. The attack may be launched remotely. No form of authentication is required for exploitation. Successful exploitation requires user interaction by the victim. Technical details as well as a public exploit are known.

A public exploit has been developed by Fakhri Zulkifli in ANSI C and been published 9 months after the advisory. The exploit is available at exploit-db.com. It is declared as proof-of-concept. The vulnerability was handled as a non-public zero-day exploit for at least 1 days. During that time the estimated underground price was around $0-$5k. The code used by the exploit is:

if (i == TOKEN_ID || (insn_is_label && i == TOKEN_INSN)) {    <-- not taken
	/* there's a label here */
	first = false;
	result->label = tokval.t_charptr;
	i = stdscan(NULL, &tokval);
	if (i == ':') {         /* skip over the optional colon */
		i = stdscan(NULL, &tokval);
	} else if (i == 0) {
		nasm_error(ERR_WARNING | ERR_WARN_OL | ERR_PASS1,
			  "label alone on a line without a colon might be in error");
	}
	if (i != TOKEN_INSN || tokval.t_integer != I_EQU) {
		/*
		 * FIXME: location.segment could be NO_SEG, in which case
		 * it is possible we should be passing 'absolute.segment'. Look into this.
		 * Work out whether that is *really* what we should be doing.
		 * Generally fix things. I think this is right as it is, but
		 * am still not certain.
		 */
		define_label(result->label,
					 in_absolute ? absolute.segment : location.segment,
					 location.offset, true);

There is no information about possible countermeasures known. It may be suggested to replace the affected object with an alternative product.

The vulnerability is also documented in the vulnerability database at Exploit-DB (46726).

Productinfo

Type

Name

License

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB CVSS-B Score: 🔍
VulDB CVSS-BT Score: 🔍
VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 4.4
VulDB Meta Temp Score: 4.3

VulDB Base Score: 3.3
VulDB Temp Score: 3.2
VulDB Vector: 🔍
VulDB Reliability: 🔍

NVD Base Score: 5.5
NVD Vector: 🔍

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
unlockunlockunlockunlockunlockunlock
unlockunlockunlockunlockunlockunlock
unlockunlockunlockunlockunlockunlock

VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍

NVD Base Score: 🔍

Exploitinginfo

Class: Null pointer dereference
CWE: CWE-476 / CWE-404
CAPEC: 🔍
ATT&CK: 🔍

Local: No
Remote: Yes

Availability: 🔍
Access: Public
Status: Proof-of-Concept
Author: Fakhri Zulkifli
Programming Language: 🔍
Download: 🔍

EPSS Score: 🔍
EPSS Percentile: 🔍

Price Prediction: 🔍
Current Price Estimation: 🔍

0-Dayunlockunlockunlockunlock
Todayunlockunlockunlockunlock

Exploit-DB: 🔍

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: no mitigation known
Status: 🔍

0-Day Time: 🔍
Exploit Delay Time: 🔍

Timelineinfo

09/05/2018 🔍
09/05/2018 +0 days 🔍
09/06/2018 +0 days 🔍
09/06/2018 +0 days 🔍
09/07/2018 +1 days 🔍
04/18/2019 +223 days 🔍
04/18/2019 +0 days 🔍
05/31/2020 +409 days 🔍

Sourcesinfo

Advisory: Bug 3392513
Status: Not defined

CVE: CVE-2018-16517 (🔍)
scip Labs: https://www.scip.ch/en/?labs.20161013

Entryinfo

Created: 09/07/2018 07:47
Updated: 05/31/2020 22:16
Changes: 09/07/2018 07:47 (67), 05/31/2020 22:16 (1)
Complete: 🔍

Discussion

No comments yet. Languages: en.

Please log in to comment.

Do you need the next level of professionalism?

Upgrade your account now!