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().
Created nasm tracking bugs for this issue:
Affects: fedora-all [bug 1472885]
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.
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/.
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.
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.
*** Bug 1652046 has been marked as a duplicate of this bug. ***