[Nasm-bugs] [Bug 3392673] New: memory leaks in nasmlib/malloc.c:75

noreply-nasm at dev.nasm.us noreply-nasm at dev.nasm.us
Wed May 27 01:47:20 PDT 2020


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

            Bug ID: 3392673
           Summary: memory leaks in nasmlib/malloc.c:75
           Product: NASM
           Version: 2.14.xx
          Hardware: PC
                OS: Linux
            Status: OPEN
          Severity: major
          Priority: Medium
         Component: Assembler
          Assignee: nobody at nasm.us
          Reporter: puppet at zju.edu.cn
                CC: chang.seok.bae at intel.com, gorcunov at gmail.com,
                    hpa at zytor.com, nasm-bugs at nasm.us
     Obtained from: Build from source archive using configure

Created attachment 411778
  --> https://bugzilla.nasm.us/attachment.cgi?id=411778&action=edit
POC-10_000809

version: nasm 2.14.03rc2

OS: Ubuntu 16.04 LTS

cmd: ./nasm -i bin ./POC -o /dev/null


ASAN log:

=================================================================
==52068==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 128 byte(s) in 1 object(s) allocated from:
    #0 0x7ffff6f02602 in malloc
(/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98602)
    #1 0x40a014 in nasm_realloc nasmlib/malloc.c:90
    #2 0x433690 in count_mmac_params asm/preproc.c:1709
    #3 0x43730e in parse_mmacro_spec asm/preproc.c:2187
    #4 0x43bb7e in do_directive asm/preproc.c:2944
    #5 0x44a6bf in pp_getline asm/preproc.c:5216
    #6 0x408b57 in assemble_file asm/nasm.c:1488
    #7 0x404a72 in main asm/nasm.c:617
    #8 0x7ffff6ac082f in __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

Direct leak of 4 byte(s) in 1 object(s) allocated from:
    #0 0x7ffff6f02602 in malloc
(/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98602)
    #1 0x409f7e in nasm_malloc nasmlib/malloc.c:75
    #2 0x40a06c in nasm_strdup nasmlib/malloc.c:104
    #3 0x436781 in parse_mmacro_spec asm/preproc.c:2133
    #4 0x43bb7e in do_directive asm/preproc.c:2944
    #5 0x44a6bf in pp_getline asm/preproc.c:5216
    #6 0x408b57 in assemble_file asm/nasm.c:1488
    #7 0x404a72 in main asm/nasm.c:617
    #8 0x7ffff6ac082f in __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

SUMMARY: AddressSanitizer: 132 byte(s) leaked in 2 allocation(s).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are watching all bug changes.


More information about the Nasm-bugs mailing list