Closed Bug 1902983 (CVE-2024-6614) Opened 1 year ago Closed 1 year ago

Assertion failure: framePtr->hasCachedSavedFrame() || hasGoodExcuse, at vm/SavedStacks.cpp:1483

Categories

(Core :: JavaScript Engine, defect, P1)

defect

Tracking

()

RESOLVED FIXED
129 Branch
Tracking Status
firefox-esr115 --- wontfix
firefox127 --- wontfix
firefox128 + fixed
firefox129 + fixed

People

(Reporter: sm-bugs, Assigned: jandem)

References

(Blocks 2 open bugs)

Details

(Keywords: reporter-external, sec-low, Whiteboard: [adv-main128+])

Attachments

(4 files)

Attached file bug.js

Steps to reproduce:

Checkout commit 97eeb1c55a5c73bd3938d4899685321a7967333b and invoke the JS shell as shown below. Please note that this seems to be a flaky crash that only triggers one-fifth of the executions.

js --fuzzing-safe  --fast-warmup --ion-check-range-analysis --ion-extra-checks  --disable-oom-functions --enable-new-set-methods --small-function-length=1024 --inlining-entry-threshold=8 --gc-zeal=21,210 --ion-scalar-replacement=on --ion-pruning=on --ion-range-analysis=on --ion-inlining=on --ion-gvn=on --ion-osr=on --ion-edgecase-analysis=on --spectre-mitigations=on --ion-limit-script-size=on --ion-offthread-compile=on --ion-optimize-gcbarriers=on --ion-iterator-indices=on --nursery-size=2 --nursery-strings=on --nursery-bigints=on --enable-ic-frame-pointers --disable-bailout-loop-check --ion-optimize-shapeguards=on --ion-licm=on --ion-instruction-reordering=on --cache-ir-stubs=on --no-sse42 --monomorphic-inlining=default --ion-load-keys=off --ion-sink=off <testcase>
``


Actual results:

Assertion failure: framePtr->hasCachedSavedFrame() || hasGoodExcuse, at vm/SavedStacks.cpp:1483
Group: firefox-core-security → core-security
Component: Untriaged → JavaScript Engine
Flags: sec-bounty?
Product: Firefox → Core
Group: core-security → javascript-core-security

Good find. This is similar to bug 1900523 but when we do a direct call instead of through a JSJitToWasm frame.

Assignee: nobody → jdemooij
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

This is similar to bug 1900523, but the fix there was incomplete because the
JSJitToWasm frame type is only used when we go through the Wasm JIT entry
trampoline. Ion can also call Wasm functions directly and in that case the type
will be FrameType::Exit.

Blocks: sm-security
Severity: -- → S3
Priority: -- → P1

I'll mark this sec-low like bug 1900523. The bug and analysis is very similar.

Keywords: sec-low
Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6ef4b7955068 Don't use bailout data after iterating Wasm frames. r=iain
Group: javascript-core-security → core-security-release
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 129 Branch

This is similar to bug 1900523, but the fix there was incomplete because the
JSJitToWasm frame type is only used when we go through the Wasm JIT entry
trampoline. Ion can also call Wasm functions directly and in that case the type
will be FrameType::Exit.

Original Revision: https://phabricator.services.mozilla.com/D214098

Attachment #9408615 - Flags: approval-mozilla-beta?

beta Uplift Approval Request

  • User impact if declined: This is related to bug 1900523 and it would be nice to have both patches in ESR 128
  • Code covered by automated testing: yes
  • Fix verified in Nightly: yes
  • Needs manual QE test: no
  • Steps to reproduce for manual QE testing: -
  • Risk associated with taking this patch: Low
  • Explanation of risk level: Fix for an edge case
  • String changes made/needed: No
  • Is Android affected?: yes
Flags: in-testsuite+
Attachment #9408615 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
QA Whiteboard: [post-critsmash-triage]
Flags: qe-verify-
Blocks: 1903968
Flags: sec-bounty? → sec-bounty-
See Also: → CVE-2024-6613

I'm sorry, the bounty payment information was intended for your bug 1901411

Whiteboard: [adv-main128+]
Flags: sec-bounty-hof+
Group: core-security-release
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: