Closed Bug 2034791 Opened 5 months ago Closed 5 months ago

VisitedModuleSet is not updated correctly on moving GC

Categories

(Core :: JavaScript Engine, defect)

defect

Tracking

()

RESOLVED FIXED
152 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr140 --- unaffected
firefox150 --- wontfix
firefox151 + fixed
firefox152 + fixed

People

(Reporter: jonco, Assigned: jonco)

References

(Regression)

Details

(Keywords: csectype-uaf, regression, sec-moderate, Whiteboard: [adv-main151+r])

Attachments

(2 files)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

This uses DefaultHasher (pointer hashing) which means the table can break on moving GC. If this happens iterating the table should work (because it is traced and keys updated) but lookups may fail (because entries won't be moved to their correct position).

This means that the visited check here could give the wrong result: https://searchfox.org/firefox-main/source/js/src/vm/Modules.cpp#1524

Even knowing what the problem is I have been unable to come up with a test case that fails (and nor has Claude).

Regressed by: 1820594
Attached file (secure) —

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

Group: javascript-core-security → core-security-release
Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 152 Branch

Please add a beta uplift request

firefox-beta Uplift Approval Request

  • User impact if declined/Reason for urgency: Possible crash / security vulnerability.
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: yes
  • Needs manual QE testing?: no
  • Steps to reproduce for manual QE testing:
  • Risk associated with taking this patch: low
  • Explanation of risk level: This is a simple change to use stable hashing for a hash table. It's been on central for two days with no issues.
  • String changes made/needed?: None
  • Is Android affected?: yes
Attachment #9574012 - Flags: approval-mozilla-beta?
Attached file (secure) —
Attachment #9574012 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
QA Whiteboard: [sec] [qa-triage-done-c152/b151]
Whiteboard: [adv-main151+r][adv-esr115.36+r][adv-esr140.11+r]
Whiteboard: [adv-main151+r][adv-esr115.36+r][adv-esr140.11+r] → [adv-main151+r]
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: