[Nasm-bugs] [Bug 3392502] New: Null pointer dereference in asm/labels.c, line 59

noreply-nasm at gorcunov.org noreply-nasm at gorcunov.org
Wed Jul 25 04:07:18 PDT 2018


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

            Bug ID: 3392502
           Summary: Null pointer dereference in asm/labels.c, line 59
           Product: NASM
           Version: 2.14 (development)
          Hardware: All
                OS: All
            Status: OPEN
          Severity: normal
          Priority: Medium
         Component: Assembler
          Assignee: nobody at nasm.us
          Reporter: bugs at feusi.co
                CC: gorcunov at gmail.com, hpa at zytor.com, nasm-bugs at nasm.us
     Obtained from: Built from git using configure

Created attachment 411657
  --> https://bugzilla.nasm.us/attachment.cgi?id=411657&action=edit
File which causes Null pointer dereference

Hi, when fuzzing nasm with the afl fuzzer I descovered a Null pointer
dereference in asm/labels.c, line 59. Following is a backtrace as supplied by
gdb:
#0  0x00005555555f2085 in islocal (l=0x0) at asm/labels.c:59
#1  find_label (created=<synthetic pointer>, create=true, label=0x0) at
asm/labels.c:206
#2  define_label (label=0x0, segment=-1, offset=1, normal=false) at
asm/labels.c:420
#3  0x00005555555acecf in assemble_file (fname=0x5555559f6d80 "/dev/stdin",
depend_ptr=0x0)
    at asm/nasm.c:1482
#4  0x00005555555a9bf8 in main (argc=<optimized out>, argv=<optimized out>) at
asm/nasm.c:566

This bug can be reproduced by calling "nasm /dev/stdin -o /dev/null < min"
where min is the file attached. However, I was only able to reproduce this bug
with the development version and I believe this is a quite recent bug.

cheers
project-repo

-- 
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