Self-registration is disabled due to spam issue (mail gorcunov@gmail.com or hpa@zytor.com to create an account)
Bug 3392789 - Null Pointer Dereference in asm/preproc.c:4335
Summary: Null Pointer Dereference in asm/preproc.c:4335
Status: OPEN
Alias: None
Product: NASM
Classification: Unclassified
Component: Assembler (show other bugs)
Version: 2.16.xx
Hardware: PC Linux
: Medium normal
Assignee: nobody
URL:
Depends on:
Blocks:
 
Reported: 2021-12-08 17:58 PST by wyxaidai
Modified: 2021-12-08 17:58 PST (History)
4 users (show)

Obtained from: Built from git using configure
Generated by: ---
Bug category:
Breaks existing code: ---


Attachments
nasm -f bin nasm_poc (334 bytes, text/plain)
2021-12-08 17:58 PST, wyxaidai
Details

Note You need to log in before you can comment on or make changes to this bug.
Description wyxaidai 2021-12-08 17:58:29 PST
Created attachment 411840 [details]
nasm -f bin nasm_poc

gdb nasm
run -f bin nasm_poc
Program received signal SIGSEGV, Segmentation fault.
0x00005555555c489e in do_directive (tline=0x7ffff7d8ba90, output=0x7fffffffdd90) at asm/preproc.c:4335
4335            list_for_each(l, istk->expansion) {

backtrace
#0  0x00005555555c489e in do_directive (tline=0x7ffff7d8ba90, output=0x7fffffffdd90) at asm/preproc.c:4335
#1  0x00005555555c74a3 in pp_tokline () at asm/preproc.c:7264
#2  pp_getline () at asm/preproc.c:7328
#3  0x00005555555b197f in assemble_file (fname=0x5555557027e0 "nasm_poc", depend_list=0x0) at asm/nasm.c:1722
#4  0x00005555555aef39 in main (argc=argc@entry=4, argv=argv@entry=0x7fffffffe258) at asm/nasm.c:717
#5  0x00007ffff7de90b3 in __libc_start_main (main=0x5555555aea40 <main>, argc=4, argv=0x7fffffffe258, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe248) at ../csu/libc-start.c:308
#6  0x00005555555af8fe in _start () at asm/nasm.c:512