Subtypes can leak through block params and results
Categories
(Core :: JavaScript: WebAssembly, defect, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr102 | --- | unaffected |
firefox113 | --- | disabled |
firefox114 | --- | disabled |
firefox115 | --- | fixed |
People
(Reporter: bvisness, Assigned: bvisness)
Details
(Keywords: sec-high)
Attachments
(2 files)
When exiting a block, we verify that the stack matches the block's result type, but we do not actually replace the stack with the block's result type. Now that subtyping has been introduced to wasm, more specific types can leak out of blocks and allow code to validate that shouldn't.
Assignee | ||
Comment 1•2 years ago
|
||
Updated•2 years ago
|
Updated•2 years ago
|
Comment 2•2 years ago
|
||
I assume this is an old problem and not a recent regresion? Will we need to fix ESR?
Comment 3•2 years ago
|
||
This is a latent issue in our type checking code that the introduction of subtyping in the wasm function-references and GC proposals exposed. It should not be triggerable without these features enabled. Neither of those proposals are enabled on any version yet though, so we should not need to uplift this.
Updated•2 years ago
|
Comment 4•2 years ago
|
||
From looking at this code with Ben, this also affects block params in addition to results.
Updated•2 years ago
|
Assignee | ||
Comment 5•2 years ago
|
||
Depends on D178346
Comment 6•2 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/86c7006980d3
Going off blame, it looks like this goes back to at least 107 (bug 1784276). As a sec-high affecting more than just Nightly, this should have gotten sec-approval prior to landing. Please request approval on that retroactively so we can assess the next steps.
Comment 7•2 years ago
|
||
This bug is only triggerable with the non-standard wasm-gc extension enabled. It's never been enabled by default on any version, including nightly.
My understanding is that this makes it less severe than the "B. The bug is a recent regression on mozilla-central" branch of approval process, which is why I recommended we land it without approval. Is sec-high appropriate for issues that would be sec-high if the feature was enabled, but is not enabled by default anywhere?
Comment 8•2 years ago
|
||
I'll redirect to Dan on that. But regardless, comment 2 asked for clarification before this landed as well.
Comment 9•2 years ago
|
||
If this requires some disabled feature, then it is okay to land without sec-approval. Comment 3 does mention that the feature it affects is disabled.
We give things security ratings as though they were enabled. Part of the idea here is that it helps keep it on people's radars so they don't forget about it before being enabled, but it can be a bit of a hassle for people who are working on projects that spend a long period being disabled.
Updated•2 years ago
|
Updated•2 years ago
|
Description
•