Many uses of TypedArray::Create don't handle failures correctly
Categories
(Core :: DOM: Bindings (WebIDL), defect)
Tracking
()
People
(Reporter: evilpie, Assigned: peterv)
References
Details
(Keywords: reporter-external, sec-audit, sec-moderate, Whiteboard: [adv-main121+])
Attachments
(4 files)
Looking at the uses of TypedArray::Create it seems to me like many either don't really consider this API fallible at all or don't clear the pending exception properly.
Considering how many problematic uses there are, even in some abstractions like CryptoBuffer::ToArrayBuffer, we should consider changing this API. I imagine we could change it to have an ErrorResult parameter by stealing the exception internally?
| Reporter | ||
Updated•1 year ago
|
Comment 1•1 year ago
|
||
Without a specific PoC it's hard to call this sec-high, but boy does this smell like trouble brewing. In the cryptobuffer case the webauthn buffers are small enough that if you're that close to OOM there's likely lots of other failing things. But I bet there are other features with more user-defined data could be easier to trigger.
Comment 2•1 year ago
|
||
Peter, is this something that your TypedArray patches will fix?
| Assignee | ||
Comment 3•1 year ago
|
||
No, but it was next on my things I want to look at for TypedArray.
Comment 4•1 year ago
|
||
Peter, feel free to change if you think severity should be higher.
| Assignee | ||
Comment 5•1 year ago
|
||
| Assignee | ||
Comment 6•1 year ago
|
||
Depends on D191416
| Assignee | ||
Comment 7•1 year ago
|
||
Depends on D191417
Updated•11 months ago
|
Updated•11 months ago
|
Updated•11 months ago
|
Comment 10•11 months ago
|
||
Push with mochitest failures
Failure log
TEST-UNEXPECTED-FAIL | dom/tests/mochitest/gamepad/test_gamepad_extensions.html | correct touch surfaceDimensions - got false, expected true
TEST-UNEXPECTED-FAIL | dom/tests/mochitest/gamepad/test_gamepad_multitouch_crossorigin.html | correct touch surfaceDimensions - got false, expected true
Push with hazard failure
Failure log
TEST-UNEXPECTED-FAIL | hazards | unrooted 'array' of type 'JS::TypedArray<JS::Scalar::Uint8>' live across GC call at dist/include/mozilla/dom/TypedArray.h:742
Comment 11•11 months ago
|
||
Comment 12•11 months ago
|
||
https://hg.mozilla.org/mozilla-central/rev/695789b9b326
https://hg.mozilla.org/mozilla-central/rev/4efe82747dc2
https://hg.mozilla.org/mozilla-central/rev/29fb30143955
Updated•11 months ago
|
Updated•10 months ago
|
Updated•10 months ago
|
Updated•10 months ago
|
Comment 13•10 months ago
|
||
Updated•10 months ago
|
Updated•9 months ago
|
Updated•8 months ago
|
Updated•7 months ago
|
Comment 14•5 months ago
|
||
Bulk-unhiding security bugs fixed in Firefox 119-121 (Fall 2023). Use "moo-doctrine-subsidy" to filter
Comment 15•4 months ago
|
||
Sorry for the burst of bugspam: filter on tinkling-glitter-filtrate
Adding reporter-external keyword to security bugs found by non-employees for accounting reasons
Description
•