Closed Bug 2013583 (CVE-2026-2766) Opened 9 months ago Closed 9 months ago

Crash [@ [anon:js-executable-memory]+0x17a1]

Categories

(Core :: JavaScript Engine: JIT, defect, P1)

x86_64
Linux
defect

Tracking

()

VERIFIED FIXED
149 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr140 148+ fixed
firefox147 --- wontfix
firefox148 + fixed
firefox149 + verified

People

(Reporter: decoder, Assigned: jandem)

References

(Regression)

Details

(7 keywords, Whiteboard: [bugmon:update,bisected,confirmed][adv-main148+] [adv-esr140.8+])

Crash Data

Attachments

(3 files, 4 external files)

The following testcase crashes on mozilla-central revision 20260130-20b1a1e6c530 (fuzzing-opt build, run with --fuzzing-safe --no-threads):

See attachment.

Backtrace:

==1749369==ERROR: UndefinedBehaviorSanitizer: SEGV on unknown address (pc 0x0a55c3fd47a1 bp 0x7ffc57302940 sp 0x7ffc573028e8 T1749369)
==1749369==The signal is caused by a READ memory access.
==1749369==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.
    #0 0x0a55c3fd47a1  ([anon:js-executable-memory]+0x17a1)

==1749369==Register values:
rax = 0x00005c6ea647d900  rbx = 0x00000a55c3fd4650  rcx = 0xfff9000000000001  rdx = 0x0000000000000001  
rdi = 0x00000a55c3fd3398  rsi = 0x0000000000000001  rbp = 0x00007ffc57302940  rsp = 0x00007ffc573028e8  
 r8 = 0x000000000004c843   r9 = 0x00000000000007e0  r10 = 0x7fffffffffffffff  r11 = 0x000000000001fffc  
r12 = 0x00003c5de7200a40  r13 = 0x0000000000000002  r14 = 0x0000000000000008  r15 = 0x00005c6ea6550020  
UndefinedBehaviorSanitizer can not provide additional info.
SUMMARY: UndefinedBehaviorSanitizer: SEGV ([anon:js-executable-memory]+0x17a1) 
==1749369==ABORTING

This bug is part of a series of bugs reported by Anthropic, thank you for your contributions to Firefox!

Attached file Testcase —

Verified bug as reproducible on mozilla-central 20260131091743-1be4ab5933df.
Unable to bisect testcase (Testcase reproduces on start build!):

Start: d87cd04072b041911d218cec1baf59de7f2a5ede (20251103213617)
End: 20b1a1e6c530f3506d5378bf5f4da504b6f03661 (20260130092147)
BuildFlags: BuildFlags(asan=True, tsan=False, debug=False, fuzzing=True, coverage=False, valgrind=False, no_opt=False, fuzzilli=False, nyx=False, searchfox=False, afl=False)

Whiteboard: [bugmon:update,bisect] → [bugmon:update,bisected,confirmed]
Duplicate of this bug: 2013777
Assignee: nobody → jdemooij
Status: NEW → ASSIGNED

This is a bug in this code in MarkActiveICScriptsAndCopyStubs.

For a BaselineStub frame, we check if the parent BaselineJS frame has an inlined ICScript for this location. If so, we mark this ICScript as active. This is necessary to handle the case where we have a stub frame but haven't pushed the callee's frame yet (eg when allocating the this object for a constructor). When we give up on trial inlining, however, we clear our record of the inlined ICScript for that location. We then fail to mark the ICScript as active and free it before we pass it to the callee.

To fix this, we could instead scan the active stub for ICScript stub fields and mark those as active. It's also a bit surprising that we continue to use IC stubs for trial-inlined IC scripts after we have disabled trial inlining. I'll file a follow-up bug to improve this, but that's not uplift material.

I think this goes back to bug 1863939.

Regressed by: 1863939
Attached file (secure) —
Attached file (secure) —

Set release status flags based on info from the regressing bug 1863939

Severity: -- → S2
Priority: -- → P1

Comment on attachment 9541764 [details]
(secure)

Security Approval Request

  • How easily could an exploit be constructed based on the patch?: It's not trivial but possible especially with help from AI nowadays.
  • Do comments in the patch, the check-in comment, or tests included in the patch paint a bulls-eye on the security problem?: No
  • Which branches (beta, release, and/or ESR) are affected by this flaw, and do the release status flags reflect this affected/unaffected state correctly?: 140+
  • If not all supported branches, which bug introduced the flaw?: Bug 1863939
  • Do you have backports for the affected branches?: Yes
  • If not, how different, hard to create, and risky will they be?: Should apply or be easy to backport.
  • How likely is this patch to cause regressions; how much testing does it need?: Medium risk. Fairly straight-forward but this is a complicated area of the code base.
  • Is the patch ready to land after security approval is given?: Yes
  • Is Android affected?: Yes
Attachment #9541764 - Flags: sec-approval?
Blocks: 2014067

Hopefully, this gets sec-approval and lands soon. We can take it for beta/esr140 after it bakes on nightly.

Comment on attachment 9541764 [details]
(secure)

sec-approval+, a=dveditz
please wait on landing the tests until 2026-04-07 or later

Attachment #9541764 - Flags: sec-approval? → sec-approval+
Whiteboard: [bugmon:update,bisected,confirmed] → [bugmon:update,bisected,confirmed][reminder-test 2026-04-07]
Duplicate of this bug: 2014366
Group: javascript-core-security → core-security-release
Status: ASSIGNED → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 149 Branch

Verified bug as fixed on rev mozilla-central 20260204214433-73cbf17ce89d.
Removing bugmon keyword as no further action possible. Please review the bug and re-add the keyword for further analysis.

Status: RESOLVED → VERIFIED
Keywords: bugmon

The patch landed in nightly and beta is affected.
:jandem, is this bug important enough to require an uplift?

For more information, please visit BugBot documentation.

Flags: needinfo?(jdemooij)
Regressions: 2014901

My patch for this added an assertion that's bogus in a certain edge case (bug 2014901). I'll remove it when I upload beta/esr140 patches.

Attached file (secure) —
Attachment #9543464 - Flags: approval-mozilla-esr140?

firefox-esr140 Uplift Approval Request

  • User impact if declined: Security bug.
  • 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: medium
  • Explanation of risk level: Fairly straight-forward but this is a complicated area of the code base.
  • String changes made/needed: N/A
  • Is Android affected?: yes
Attached file (secure) —
Attachment #9543465 - Flags: approval-mozilla-beta?

firefox-beta Uplift Approval Request

  • User impact if declined: Security bug.
  • 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: medium
  • Explanation of risk level: Fairly straight-forward but this is a complicated area of the code base.
  • String changes made/needed: N/A
  • Is Android affected?: yes
Flags: needinfo?(jdemooij)
Attachment #9543465 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9543464 - Flags: approval-mozilla-esr140? → approval-mozilla-esr140+
Whiteboard: [bugmon:update,bisected,confirmed][reminder-test 2026-04-07] → [bugmon:update,bisected,confirmed][reminder-test 2026-04-07][adv-main148+]
Whiteboard: [bugmon:update,bisected,confirmed][reminder-test 2026-04-07][adv-main148+] → [bugmon:update,bisected,confirmed][reminder-test 2026-04-07][adv-main148+] [adv-esr140.8+]
Alias: CVE-2026-2766

2 months ago, dveditz placed a reminder on the bug using the whiteboard tag [reminder-test 2026-04-07] .

jandem, please refer to the original comment to better understand the reason for the reminder.

Flags: needinfo?(jdemooij)
Whiteboard: [bugmon:update,bisected,confirmed][reminder-test 2026-04-07][adv-main148+] [adv-esr140.8+] → [bugmon:update,bisected,confirmed][adv-main148+] [adv-esr140.8+]
Flags: needinfo?(jdemooij)
Group: core-security-release
Keywords: keep-hidden
See Also: → 2073688
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: