Skip to content

SEGV in mjs.c: 9546 #296

@LowryLan

Description

@LowryLan

Invalid write memory access in mjs.c: 9546

Environment

ubuntu20.04

Step to reproduce

  1. version
    9eae0e6
  2. compile mjs with ASAN
gcc -DMJS_MAIN mjs.c -fsanitize=address -ldl -g -o mjs-bin
  1. command for reproducing the error
./mjs-bin -f poc

Download poc:
Invalid_wite_memory_access.zip

ASAN report

AddressSanitizer:DEADLYSIGNAL
=================================================================
==239602==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x564d936b81e4 bp 0x000000000022 sp 0x7ffdd2ee5ce0 T0)
==239602==The signal is caused by a WRITE memory access.
==239602==Hint: address points to the zero page.
    #0 0x564d936b81e4 in mjs_execute /home/lowry/Documents/HTFuzz/program/mjs/code/mjs.c:9546
    #1 0x564d936ceee7 in mjs_exec_internal /home/lowry/Documents/HTFuzz/program/mjs/code/mjs.c:9737
    #2 0x564d9360c814 in mjs_exec_file /home/lowry/Documents/HTFuzz/program/mjs/code/mjs.c:9760
    #3 0x564d9360c814 in main /home/lowry/Documents/HTFuzz/program/mjs/code/mjs.c:12030
    #4 0x7f0873941082 in __libc_start_main ../csu/libc-start.c:308
    #5 0x564d9360d26d in _start (/home/lowry/Documents/HTFuzz/program/mjs/code/mjs-bin+0xd26d)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/lowry/Documents/HTFuzz/program/mjs/code/mjs.c:9546 in mjs_execute
==239602==ABORTING

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions