Bug 1472882 (CVE-2017-10686) - CVE-2017-10686 nasm: Use-after-free in the detoken() function
Summary: CVE-2017-10686 nasm: Use-after-free in the detoken() function
Keywords:
Status: CLOSED WONTFIX
Alias: CVE-2017-10686
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
: CVE-2018-19216 (view as bug list)
Depends On: 1472885
Blocks: 1472886 1652048
TreeView+ depends on / blocked
 
Reported: 2017-07-19 15:13 UTC by Andrej Nemec
Modified: 2019-09-29 14:16 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-07 13:40:37 UTC


Attachments (Terms of Use)

Description Andrej Nemec 2017-07-19 15:13:27 UTC
In Netwide Assembler (NASM), there are multiple heap use after free vulnerabilities in the tool nasm. The related heap is allocated in the token() function and freed in the detoken() function (called by pp_getline()) - it is used again at multiple positions later that could cause multiple damages. For example, it causes a corrupted double-linked list in detoken(), a double free or corruption in delete_Token(), and an out-of-bounds write in detoken().

Upstream issue:

https://bugzilla.nasm.us/show_bug.cgi?id=3392414

Comment 1 Andrej Nemec 2017-07-19 15:15:50 UTC
Created nasm tracking bugs for this issue:

Affects: fedora-all [bug 1472885]

Comment 3 Stefan Cornelius 2017-08-03 10:03:36 UTC
Patch:
http://repo.or.cz/nasm.git/commit/736be08cf3ec4d1da31f350359feb8c1c782de9a
http://repo.or.cz/nasm.git/commit/f9ec5bbd2af6ff5276f1fd5ab52df4ed7b096344

Note that 736be08cf3ec4d1da31f350359feb8c1c782de9a trades a use-after-free for a memory leak. Not very elegant, but for the normal nasm use cases that I can imagine this is probably OK.

Comment 4 Stefan Cornelius 2017-08-07 13:40:46 UTC
Statement:

Red Hat Product Security has rated this issue as having Moderate security impact. This issue is not currently planned to be addressed in future updates. For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/.

Comment 5 Fedora Update System 2017-08-18 00:25:17 UTC
nasm-2.13.01-3.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2017-08-18 04:49:08 UTC
nasm-2.13.01-3.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 7 Stefan Cornelius 2018-11-23 14:45:09 UTC
*** Bug 1652046 has been marked as a duplicate of this bug. ***


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