Bug 1626549 (CVE-2018-16517) - CVE-2018-16517 nasm: NULL Pointer Dereference in asm/labels.c
Summary: CVE-2018-16517 nasm: NULL Pointer Dereference in asm/labels.c
Keywords:
Status: CLOSED WONTFIX
Alias: CVE-2018-16517
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1626550 1626551
Blocks: 1626554
TreeView+ depends on / blocked
 
Reported: 2018-09-07 15:29 UTC by Laura Pardo
Modified: 2019-09-29 14:58 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-06-10 10:37:40 UTC


Attachments (Terms of Use)

Description Laura Pardo 2018-09-07 15:29:07 UTC
A flaw was found in Netwide Assembler (NASM). A NULL Pointer Dereference in asm/labels.c which allows the attacker to cause a denial of service via a crafted file.


References:
https://bugzilla.nasm.us/show_bug.cgi?id=3392513
https://fakhrizulkifli.github.io/CVE-2018-16517.html

Comment 1 Laura Pardo 2018-09-07 15:29:29 UTC
Created nasm tracking bugs for this issue:

Affects: fedora-all [bug 1626550]

Comment 4 Scott Gayou 2018-10-17 16:29:59 UTC
Doesn't reproduce on any RHEL version.

Looks like it boils down to this (presumably "correct" logic in our older release):

```c
                        if (!output_ins.label)
                            nasm_error(ERR_NONFATAL,
                                         "EQU not preceded by label");

                        else if (output_ins.label[0] != '.' ||
```

whereas mainline had:

```c
                if (!output_ins.label)
                    nasm_error(ERR_NONFATAL,
                               "EQU not preceded by label");

                if (output_ins.operands == 1 &&
                    (output_ins.oprs[0].type & IMMEDIATE) &&
                    output_ins.oprs[0].wrt == NO_SEG) {
```

Patch added back the else -- i.e. the if/then should bail if !output_ins.label.


Note You need to log in before you can comment on or make changes to this bug.