Closed
Bug 2013993
Opened 9 months ago
Closed 5 months ago
src/js/src/vm/Iteration.cpp:914:32: runtime error: constructor call on misaligned address 0x561f58fe951c for type 'GCPtr<Shape *>', which requires 8 byte alignment
Categories
(Core :: JavaScript Engine, defect, P3)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
153 Branch
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox-esr140 | --- | unaffected |
| firefox149 | --- | wontfix |
| firefox151 | --- | wontfix |
| firefox152 | --- | wontfix |
| firefox153 | --- | fixed |
People
(Reporter: tsmith, Assigned: alexical)
References
(Blocks 2 open bugs)
Details
(Keywords: csectype-undefined, sec-moderate, Whiteboard: [adv-main153+r])
Attachments
(1 external file)
This was found by enabling the alignment check in UBSan. This type of issue can impact performance, stability and create inconsistencies across platforms, architectures and optimization levels.
This issue is trigger on browser startup. Found with m-c 20260202-1db5c98531ac.
To enable this check add the following to your mozconfig:
ac_add_options --enable-undefined-sanitizer="alignment"
src/js/src/vm/Iteration.cpp:914:32: runtime error: constructor call on misaligned address 0x561f58fe951c for type 'GCPtr<Shape *>', which requires 8 byte alignment
0x561f58fe951c: note: pointer points here
88 45 00 00 8e 45 00 00 8f 45 00 00 97 45 00 00 81 06 00 00 00 00 00 00 e0 5c c5 0d 82 7f 00 00
^
#0 0x7f8201ae9d79 in js::NativeIterator::NativeIterator(JSContext*, JS::Handle<js::PropertyIteratorObject*>, JS::Handle<JSObject*>, JS::Handle<JS::StackGCVector<JS::PropertyKey, js::TempAllocPolicy>>, bool, mozilla::Vector<js::PropertyIndex, 8ul, js::TempAllocPolicy>*, unsigned int, unsigned int, bool, bool*) src/js/src/vm/Iteration.cpp:914:9
#1 0x7f8201aed51d in CreatePropertyIterator(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::StackGCVector<JS::PropertyKey, js::TempAllocPolicy>>, bool, mozilla::Vector<js::PropertyIndex, 8ul, js::TempAllocPolicy>*, unsigned int, unsigned int, bool) src/js/src/vm/Iteration.cpp:832:13
#2 0x7f8201aeac77 in GetIteratorImpl(JSContext*, JS::Handle<JSObject*>, bool, bool) src/js/src/vm/Iteration.cpp:1283:37
#3 0x0cbe72e067da (<unknown module>)
SUMMARY: UndefinedBehaviorSanitizer: misaligned-pointer-use src/js/src/vm/Iteration.cpp:914:32
Updated•9 months ago
|
Comment 1•9 months ago
|
||
Looks to be this line new (protoShapesEnd()) GCPtr<Shape*>(shape);
Which makes me wonder if this code https://searchfox.org/firefox-main/source/js/src/vm/Iteration.h#349-360 isn't aligning properly.
| Reporter | ||
Updated•5 months ago
|
Group: javascript-core-security
Keywords: sec-moderate
| Assignee | ||
Updated•5 months ago
|
Assignee: nobody → dothayer
Flags: needinfo?(dothayer)
| Assignee | ||
Comment 3•5 months ago
|
||
Pushed by dothayer@mozilla.com:
https://github.com/mozilla-firefox/firefox/commit/e897227c9d9d
https://hg.mozilla.org/integration/autoland/rev/a6294bbed139
Ensure proto shapes aligned in NativeIterator r=jandem
Comment 5•5 months ago
|
||
Group: javascript-core-security → core-security-release
Status: NEW → RESOLVED
Closed: 5 months ago
status-firefox153:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 153 Branch
Updated•5 months ago
|
status-firefox151:
--- → wontfix
status-firefox152:
--- → wontfix
status-firefox-esr115:
--- → unaffected
status-firefox-esr140:
--- → unaffected
Updated•5 months ago
|
QA Whiteboard: [sec] [qa-triage-done-c154/b153]
Updated•3 months ago
|
Whiteboard: [adv-main153+r]
Updated•1 month ago
|
Group: core-security-release
You need to log in
before you can comment on or make changes to this bug.
Description
•