#613 new
Ahcheong Lee

SEGV on nasm-pp.c:3484

Reported by Ahcheong Lee | April 29th, 2021 @ 04:10 PM

I report a SEGV detected by address sanitizer.
I found this test input by fuzz testing.

The stack traces are as follows:
==26915==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000018 (pc 0x00000041cb82 bp 0x00000000011b sp 0x7fffffffda80 T0) ==26915==The signal is caused by a READ memory access. ==26915==Hint: address points to the zero page. #0 0x41cb82 in do_directive /home/cheong/subjects/yasm-1.3.0/modules/preprocs/nasm/nasm-pp.c:3484:20 #1 0x40c646 in pp_getline /home/cheong/subjects/yasm-1.3.0/modules/preprocs/nasm/nasm-pp.c:5075:13 #2 0x4289a2 in nasm_preproc_get_line /home/cheong/subjects/yasm-1.3.0/modules/preprocs/nasm/nasm-preproc.c:195:12 #3 0x42ec0d in nasm_parser_parse /home/cheong/subjects/yasm-1.3.0/modules/parsers/nasm/nasm-parse.c:219:13 #4 0x44a2c7 in nasm_do_parse /home/cheong/subjects/yasm-1.3.0/modules/parsers/nasm/nasm-parser.c:66:5 #5 0x44a2c7 in nasm_parser_do_parse /home/cheong/subjects/yasm-1.3.0/modules/parsers/nasm/nasm-parser.c:83:5 #6 0x48458f in do_assemble /home/cheong/subjects/yasm-1.3.0/frontends/yasm/yasm.c:519:5 #7 0x48458f in main /home/cheong/subjects/yasm-1.3.0/frontends/yasm/yasm.c:749:12 #8 0x7ffff6e22bf6 in __libc_start_main /build/glibc-S9d2JN/glibc-2.27/csu/../csu/libc-start.c:310 #9 0x2e2cc9 in start (/home/cheong/afl++/subjectsfriend/yasm/yasm.san+0x2e2cc9)

You can reproduce the bug by executing

I tested the subject on yasm-1.3.0.

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Yasm Modular Assembler Project

Shared Ticket Bins

People watching this ticket