Submit #517394: QuickJS Project QuickJS master version https://github.com/quickjs-ng/quickjs/commit/74fd4d7dc90f7ebf07e0bb4c7223d1cb98f8ad78 Stack-based Buffer Overflowinfo

TitleQuickJS Project QuickJS master version https://github.com/quickjs-ng/quickjs/commit/74fd4d7dc90f7ebf07e0bb4c7223d1cb98f8ad78 Stack-based Buffer Overflow
DescriptionHi, The following test input (input.js) causes the qjs a stack-overflow issue. $cat input.js function f() { f(1,2,3) } f(1) $./qjs input.js ASAN:DEADLYSIGNAL ================================================================= ==8279==ERROR: AddressSanitizer: stack-overflow on address 0x7fffff7fe5d8 (pc 0x55555572c03a bp 0x7fffff8004a0 sp 0x7fffff7fe580 T0) #0 0x55555572c039 in JS_CallInternal /home/benchmarks/quickjs/quickjs.c:14853 #1 0x5555557341de in JS_CallInternal /home/benchmarks/quickjs/quickjs.c:15304 #2 0x5555557341de in JS_CallInternal /home/benchmarks/quickjs/quickjs.c:15304 ...... // omit the same stack trace infomration #249 0x5555557341de in JS_CallInternal /home/benchmarks/quickjs/quickjs.c:15304 #250 0x5555557341de in JS_CallInternal /home/benchmarks/quickjs/quickjs.c:15304 SUMMARY: AddressSanitizer: stack-overflow /home/benchmarks/quickjs/quickjs.c:14853 in JS_CallInternal ==8279==ABORTING Compilation command: cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-fsanitize=address -ldl -static-libasan" -DCMAKE_INSTALL_PREFIX=/home/benchmarks/quickjs/build .. and make -j12. Compiler version: gcc-7.5.0. System: ubuntu 18.04. quickjs version: master (74fd4d7). Thanks.
Source⚠️ https://github.com/quickjs-ng/quickjs/issues/775
User
 Haoxin Tu (UID 81718)
Submission03/10/2025 12:25 (1 Year ago)
Moderation03/21/2025 07:44 (11 days later)
StatusAccepted
VulDB entry300571 [quickjs-ng QuickJS up to 0.8.0 qjs quickjs.c JS_GetRuntime stack-based overflow]
Points20

Might our Artificial Intelligence support you?

Check our Alexa App!