[Nasm-bugs] [Bug 3392706] New: double free in pp_tokline asm/preproc.c:6625

noreply-nasm at dev.nasm.us noreply-nasm at dev.nasm.us
Tue Jul 28 03:58:24 PDT 2020


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

            Bug ID: 3392706
           Summary: double free in pp_tokline asm/preproc.c:6625
           Product: NASM
           Version: 2.15 (development)
          Hardware: All
                OS: All
            Status: OPEN
          Severity: normal
          Priority: Medium
         Component: Assembler
          Assignee: nobody at nasm.us
          Reporter: prada960808 at gmail.com
                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 411795
  --> https://bugzilla.nasm.us/attachment.cgi?id=411795&action=edit
poc

Hi, 
I found a double free in pp_tokline asm/preproc.c:6625
It is triggered in nasm version 2.15rc10.

Please run following command
`nasm -f win64 -o tmp.o $PoC`


==31696==ERROR: AddressSanitizer: attempting double-free on 0x60c0001d6d40 in
thread T0:
    #0 0x7f6602d207a8 in __interceptor_free
(/usr/lib/x86_64-linux-gnu/libasan.so.4+0xde7a8)
    #1 0x55559ebad12d in pp_tokline asm/preproc.c:6625
    #2 0x55559ebad12d in pp_getline asm/preproc.c:6779
    #3 0x55559ea13dfa in assemble_file asm/nasm.c:1705
    #4 0x55559ea09056 in main asm/nasm.c:712
    #5 0x7f6602872b96 in __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    #6 0x55559ea0c129 in _start
(/mnt/hda2/suhwan/add_project/final/FINAL_TEST_ZONE/program/nasm-2.15rc10/install_dir/bin/nasm+0x124129)

0x60c0001d6d40 is located 0 bytes inside of 128-byte region
[0x60c0001d6d40,0x60c0001d6dc0)
freed by thread T0 here:
    #0 0x7f6602d207a8 in __interceptor_free
(/usr/lib/x86_64-linux-gnu/libasan.so.4+0xde7a8)
    #1 0x55559ebad12d in pp_tokline asm/preproc.c:6625
    #2 0x55559ebad12d in pp_getline asm/preproc.c:6779

previously allocated by thread T0 here:
    #0 0x7f6602d20d28 in __interceptor_calloc
(/usr/lib/x86_64-linux-gnu/libasan.so.4+0xded28)
    #1 0x55559ea39766 in nasm_calloc nasmlib/alloc.c:72

SUMMARY: AddressSanitizer: double-free
(/usr/lib/x86_64-linux-gnu/libasan.so.4+0xde7a8) in __interceptor_free
==31696==ABORTING

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


More information about the Nasm-bugs mailing list