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 at xs/sources/xsAll.c:161 #484

Closed
kvenux opened this issue Oct 22, 2020 · 1 comment
Closed

SEGV at xs/sources/xsAll.c:161 #484

kvenux opened this issue Oct 22, 2020 · 1 comment
Labels
confirmed issue reported has been reproduced fixed - please verify Issue has been fixed. Please verify and close.

Comments

@kvenux
Copy link

kvenux commented Oct 22, 2020

Build environment:

Ubuntu 16.04
gcc 5.4.0
xst version: 748fda9
build command:
cd /path/to/moddable/xs/makefiles/lin
make
test command: ./xst poc

Target device:

Desktop Linux

POC

xs-new-000040.txt

Description

Below is the ASAN outputs.

ASAN:SIGSEGV

==91961==ERROR: AddressSanitizer: SEGV on unknown address 0x0000ffffffc0 (pc 0x7f9f2bbbd834 bp 0x7ffe70dbddd0 sp 0x7ffe70dbd558 T0)
#0 0x7f9f2bbbd833 in strlen (/lib/x86_64-linux-gnu/libc.so.6+0x8b833)
#1 0x7f9f2c4921a5 in __interceptor_strlen (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x701a5)
#2 0x41d719 in fxConcatString /home/keven/Fuzzing/moddable-new/xs/sources/xsAll.c:161
#3 0x7c9c4d in fx_RegExp_prototype_toString /home/keven/Fuzzing/moddable-new/xs/sources/xsRegExp.c:1082
#4 0x7e7d41 in fxRunID /home/keven/Fuzzing/moddable-new/xs/sources/xsRun.c:769
#5 0x6303c4 in fx_Function_prototype_call /home/keven/Fuzzing/moddable-new/xs/sources/xsFunction.c:518
#6 0x7e7d41 in fxRunID /home/keven/Fuzzing/moddable-new/xs/sources/xsRun.c:769
#7 0x850672 in fxRunScript /home/keven/Fuzzing/moddable-new/xs/sources/xsRun.c:4606
#8 0xa31992 in fxRunProgramFile /home/keven/Fuzzing/moddable-new/xs/tools/xst.c:1398
#9 0x41902a in main /home/keven/Fuzzing/moddable-new/xs/tools/xst.c:290
#10 0x7f9f2bb5283f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2083f)
#11 0x41bb98 in _start (/home/keven/Fuzzing/moddable-new/build/bin/lin/debug/xst+0x41bb98)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV ??:0 strlen
==91961==ABORTING

@phoddie phoddie added the confirmed issue reported has been reproduced label Oct 22, 2020
mkellner pushed a commit that referenced this issue Nov 5, 2020
@phoddie phoddie added the fixed - please verify Issue has been fixed. Please verify and close. label Nov 5, 2020
@phoddie
Copy link
Collaborator

phoddie commented Nov 5, 2020

Calling RegExp.prototype.toString with a proxy that returns numbers for source and flags crashed

@kvenux kvenux closed this as completed Nov 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed issue reported has been reproduced fixed - please verify Issue has been fixed. Please verify and close.
Projects
None yet
Development

No branches or pull requests

2 participants