Closed Bug 2014366 Opened 9 months ago Closed 9 months ago

SEGV in EnterBaseline() at BaselineJIT.cpp:147

Categories

(Core :: JavaScript Engine: JIT, defect)

defect

Tracking

()

RESOLVED DUPLICATE of bug 2013583

People

(Reporter: x0e, Unassigned)

Details

(Keywords: reporter-external)

Steps to reproduce:

engine version             : d8636da7d75fe4aff0a4ccea8413cfcdc7be08fd
engine version date.    : 2026-02-03T00:30:44

Args:

js --fuzzing-safe --gc-zeal=10,131 bug.js

Test case:

function a() {
    this.b
}
v5 = [a.prototype]
for (c = 0;
    ;
    c++) {
    e = v5[c == 500 | 0]
    d = e?.constructor
    try {
        d()
    }
    catch { }
    a.prototype = e
    new a
}

Actual results:

Back trace:

=2099582==ERROR: UndefinedBehaviorSanitizer: SEGV on unknown address (pc 0x1e1803ba9708 bp 0x7fffec4d1740 sp 0x7fffec4d16f0 T2099582)
==2099582==The signal is caused by a READ memory access.
==2099582==Hint: this fault was caused by a dereference of a high value address (see register values below).  Disassemble the provided pc to learn which register was used.
/opt/swift/usr/bin/llvm-symbolizer: error: '[anon:js-executable-memory]': No such file or directory
    #0 0x1e1803ba9708  ([anon:js-executable-memory]+0x5708)
    #1 0x1e1803be9075  ([anon:js-executable-memory]+0x5075)
    #2 0x1e1803be80bb  ([anon:js-executable-memory]+0x40bb)
    #3 0x1e1803bb48d7  ([anon:js-executable-memory]+0x8d7)
    #4 0x580a4909fa5d in EnterBaseline(JSContext*, EnterJitData&) js/src/jit/BaselineJIT.cpp:147:5
    #5 0x580a4909fa5d in js::jit::EnterBaselineInterpreterAtBranch(JSContext*, js::InterpreterFrame*, unsigned char*) js/src/jit/BaselineJIT.cpp:202:26
    #6 0x580a494fa042 in js::Interpret(JSContext*, js::RunState&) js/src/vm/Interpreter.cpp:2032:17
    #7 0x580a494f35ba in js::RunScript(JSContext*, js::RunState&) js/src/vm/Interpreter.cpp:460:13
    #8 0x580a494f6420 in js::ExecuteKernel(JSContext*, JS::Handle<JSScript*>, JS::Handle<JSObject*>, js::AbstractFramePtr, JS::MutableHandle<JS::Value>) js/src/vm/Interpreter.cpp:850:10
    #9 0x580a494f687e in js::Execute(JSContext*, JS::Handle<JSScript*>, JS::Handle<JSObject*>, JS::MutableHandle<JS::Value>) js/src/vm/Interpreter.cpp:880:10
    #10 0x580a497a2921 in ExecuteScript(JSContext*, JS::Handle<JSObject*>, JS::Handle<JSScript*>, JS::MutableHandle<JS::Value>) js/src/vm/CompilationAndEvaluation.cpp:548:10
    #11 0x580a497a2b03 in JS_ExecuteScript(JSContext*, JS::Handle<JSScript*>) js/src/vm/CompilationAndEvaluation.cpp:572:10
    #12 0x580a4854ac5d in RunFile(JSContext*, char const*, _IO_FILE*, CompileUtf8, bool, bool) js/src/shell/js.cpp:1403:10
    #13 0x580a48549f0a in Process(JSContext*, char const*, bool, FileKind) js/src/shell/js.cpp
    #14 0x580a48503325 in ProcessArgs(JSContext*, js::cli::OptionParser*) js/src/shell/js.cpp:12162:10
    #15 0x580a48503325 in Shell(JSContext*, js::cli::OptionParser*) js/src/shell/js.cpp:12442:12
    #16 0x580a484f9aed in main js/src/shell/js.cpp:12859:12
    #17 0x7a3786b091c9 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
    #18 0x7a3786b0928a in __libc_start_main csu/../csu/libc-start.c:360:3
    #19 0x580a484c1848 in _start (/home/user/fuzzilli-ng/targets/spidermonkey/artifacts/builds/reproducebuild-d8636da7d75f/dist/bin/js+0x1d68848) (BuildId: 1ee4e483077feb07d151470c5ce1b524)

==2099582==Register values:
rax = 0x000008f9fc954060  rbx = 0x00001e1803bafca0  rcx = 0xfffe3859bc800020  rdx = 0x0000000000000000
rdi = 0xe5e5e5e5e5e5e5e5  rsi = 0x00007fffec4d1698  rbp = 0x00007fffec4d1740  rsp = 0x00007fffec4d16f0
 r8 = 0x0000000000000008   r9 = 0x0000000000000000  r10 = 0x0000000000000000  r11 = 0x000000000001fffc
r12 = 0x000008f9fc9910b2  r13 = 0x00007fffec4d1908  r14 = 0x00007a37858254eb  r15 = 0x00007a3785838200
UndefinedBehaviorSanitizer can not provide additional info.
SUMMARY: UndefinedBehaviorSanitizer: SEGV ([anon:js-executable-memory]+0x5708)
==2099582==ABORTING
Group: firefox-core-security → core-security
Component: Untriaged → JavaScript Engine: JIT
Product: Firefox → Core
Group: core-security → javascript-core-security

Maybe a duplicate of bug 2013583. NI myself to check.

Flags: needinfo?(jdemooij)

Thanks for the report.

This is a duplicate of bug 2013583. The test case here is also very similar to the one in bug 2013777.

Status: NEW → RESOLVED
Closed: 9 months ago
Duplicate of bug: CVE-2026-2766
Flags: needinfo?(jdemooij)
Resolution: --- → DUPLICATE

Ah, well, I assumed the patch is already pushed, sorry. Is there any way for me to see if the bug that was duplicated has been fixed?

(In reply to x0e from comment #3)

Ah, well, I assumed the patch is already pushed, sorry. Is there any way for me to see if the bug that was duplicated has been fixed?

No problem at all, a duplicate report is much better than not knowing about a security bug. A fix for this bug landed about 7 hours ago. The patch is in the autoland repo and will be merged to firefox-main at some point today or tomorrow.

https://github.com/mozilla-firefox/firefox/commit/32cb02d93d4f
https://hg.mozilla.org/integration/autoland/rev/9f8e886fa8c6

Flags: sec-bounty-
Group: javascript-core-security
You need to log in before you can comment on or make changes to this bug.