Closed Bug 1979502 (CVE-2025-10532) Opened 1 year ago Closed 1 year ago

Assertion failure: !empty(), at dist/include/mozilla/Vector.h:597

Categories

(Core :: JavaScript: GC, defect, P3)

All
Linux
defect

Tracking

()

RESOLVED FIXED
143 Branch
Tracking Status
firefox-esr115 --- wontfix
firefox-esr128 --- wontfix
firefox-esr140 143+ fixed
firefox141 --- wontfix
firefox142 --- wontfix
firefox143 + fixed

People

(Reporter: gkw, Assigned: jonco)

References

(Blocks 1 open bug, Regression)

Details

(6 keywords, Whiteboard: [adv-main143+][adv-esr140.3+])

Attachments

(13 files)

Attached file debug stack
for (let i = 0; i < 200; i++) {
  var x = /x/;
  oomTest(function () {
    gcslice(99999);
    enableGeckoProfiling();
    disableGeckoProfiling();
  });
}
(gdb) bt
#0  0x0000555557deec44 in MOZ_CrashSequence (aAddress=0x0, aLine=597) at /home/msf1/shell-cache/js-dbg-64-linux-x86_64-37783a3d0d3f/objdir-js/dist/include/mozilla/Assertions.h:248
#1  mozilla::Vector<js::gcstats::Statistics::SliceData, 8ul, js::SystemAllocPolicy>::back (this=0x7ffff5e329c0)
    at /home/msf1/shell-cache/js-dbg-64-linux-x86_64-37783a3d0d3f/objdir-js/dist/include/mozilla/Vector.h:597
#2  js::gcstats::Statistics::recordParallelPhase (this=0x7ffff5e32960, phaseKind=js::gcstats::PhaseKind::SWEEP, duration=...)
    at /home/msf1/trees/mozilla-central/js/src/gc/Statistics.cpp:1569
#3  0x0000555557d2ed27 in js::GCParallelTask::join (this=0x7ffff5e349b0, deadline=...) at /home/msf1/trees/mozilla-central/js/src/gc/GCParallelTask.cpp:95
#4  0x0000555557df1820 in js::gc::GCRuntime::waitBackgroundSweepEnd (this=0x7ffff5e32888) at /home/msf1/trees/mozilla-central/js/src/gc/Sweeping.cpp:547
#5  0x000055555740ed49 in js::gc::ZoneAllCellIter<js::gc::TenuredCell>::initForTenuredIteration (this=0x7fffffffb210, zone=0x7ffff4cc9000, kind=<optimized out>)
    at /home/msf1/trees/mozilla-central/js/src/gc/GC-inl.h:159
/snip

This seems to have occurred since prior to m-c rev 1db2ef126a6a, gh rev 48de8371eacd8be6e794cba9b8849d085edaecf1 (late-Apr 2024, Firefox 127-approx).

Run with --fuzzing-safe --ion-offthread-compile=off --ion-eager, compile with AR=ar sh ../configure --enable-debug --enable-debug-symbols --with-ccache --enable-nspr-build --enable-ctypes --enable-gczeal --enable-rust-simd --disable-tests, tested on m-c rev 37783a3d0d3f.

This seems to be really reproducible on a machine for me, yet unreliable/non-reproducible on another, I'm not sure why.

Jon/Steve, any ideas?

Flags: sec-bounty?
Flags: needinfo?(sphink)
Flags: needinfo?(jcoppeard)
Attached file x00

Combine using:

cat x00 x01 > out.tar.xz

The SHA-256 checksum of the tarball should be 6da9f9b8f4bade01899579150e9957cade3868fa2dc408d07a204f40eca4472e, and this will contain the coredump.

Attached file xaa

Combine using:

cat xa* > binary.tar.xz

The SHA-256 checksum of the tarball should be 0276315941f33d76f4acae594ebf8d8cc58bb3c2c7cad7707b48a92d474515f7, and this will contain the shell.

Run these with gdb using gdb SHELL COREDUMP. I split this up due to Bugzilla attachment upload size limitations.

Use the set substitute-path command in gdb to change paths to the local m-c source directory.

Group: core-security → javascript-core-security
Severity: -- → S3
Priority: -- → P3

I can't reproduce this but I can see what the problem is.

Assignee: nobody → jcoppeard
Flags: needinfo?(sphink)
Flags: needinfo?(jcoppeard)
Attached file (secure)

|aborted| is reset to false at the end of a slice but
GCRuntime::waitBackgroundSweepEnd can be called outside of a slice.

This is a buffer overrun but it depends on OOM happening at a particular point and is also depends on a later operation happening at the right time. So this is hard to trigger.

Regressed by: 1634429

I'll mark this sec-moderate as it requires OOM and difficult timing to trigger.

Keywords: sec-moderate

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

Group: javascript-core-security → core-security-release
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 143 Branch

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

For more information, please visit BugBot documentation.

Flags: needinfo?(jcoppeard)

We'll want an ESR140 uplift request, but that'll be all at this point.

Flags: sec-bounty? → sec-bounty+
Keywords: csectype-oom
QA Whiteboard: [sec] [uplift] [qa-triage-done-c144/b143]
Flags: qe-verify-

Comment on attachment 9506407 [details]
(secure)

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: This is still a possible security vulnerability it's just harder to exploit because it requires OOM.
  • User impact if declined: Possible crash / security vulnerability.
  • Fix Landed on Version: 143
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This is a very simple change and has been present in nightly for two weeks without incident.
Flags: needinfo?(jcoppeard)
Attachment #9506407 - Flags: approval-mozilla-esr140?

Comment on attachment 9506407 [details]
(secure)

Approved for 140.3esr.

Attachment #9506407 - Flags: approval-mozilla-esr140? → approval-mozilla-esr140+
Whiteboard: [adv-main143+]
Whiteboard: [adv-main143+] → [adv-main143+][adv-main140.3+]
Whiteboard: [adv-main143+][adv-main140.3+] → [adv-main143+][adv-esr140.3+]
Alias: CVE-2025-10532
See Also: → 1445260
Group: core-security-release
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: