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

A NULL pointer dereference in the function mjs_print() mjs.c:8085 #164

Open
Clingto opened this issue May 19, 2021 · 0 comments
Open

A NULL pointer dereference in the function mjs_print() mjs.c:8085 #164

Clingto opened this issue May 19, 2021 · 0 comments

Comments

@Clingto
Copy link

Clingto commented May 19, 2021

System info:
Ubuntu 16.04.6 LTS, X64, gcc 5.4.0, mjs (latest master 4c870e5)
Compile Command:

$ gcc -fsanitize=address -fno-omit-frame-pointer -DMJS_MAIN mjs.c -ldl -g -o mjs

Run Command:

$ mjs -f $POC

POC file:
https://github.com/Clingto/POC/blob/master/MSA/mjs/mjs-7992-mjs_print-null-pointer-deref

ASAN info:

ASAN:SIGSEGV
=================================================================
==9049==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x00000041dcd0 bp 0x7ffd941a9290 sp 0x7ffd941a8fc8 T0)
    #0 0x41dccf in mjs_print  test/mjs-uaf/build_asan/mjs.c:8085
    #1 0x4265f1 in mjs_exec_internal  test/mjs-uaf/build_asan/mjs.c:9866
    #2 0x426873 in mjs_exec_file  test/mjs-uaf/build_asan/mjs.c:9889
    #3 0x431348 in main  test/mjs-uaf/build_asan/mjs.c:12228
    #4 0x7fd3b806982f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #5 0x401af8 in _start ( test/mjs-uaf/bin_asan/bin/mjs_bin+0x401af8)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV  test/mjs-uaf/build_asan/mjs.c:8085 mjs_print
==9049==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