Crash in [@ nsCOMPtr_base::assign_assuming_AddRef | nsCOMPtr_base::assign_with_AddRef | nsCOMPtr<T>::operator= | mozilla::net::TLSTransportLayer::OutputStreamWrapper::AsyncWait]
Categories
(Core :: Networking: HTTP, defect, P1)
Tracking
()
People
(Reporter: mccr8, Assigned: kershaw)
References
Details
(Keywords: crash, csectype-uaf, sec-high, Whiteboard: [necko-triaged][post-critsmash-triage][adv-main107+r][adv-esr102.5+r])
Crash Data
Attachments
(1 file)
|
48 bytes,
text/x-phabricator-request
|
dmeehan
:
approval-mozilla-beta+
pascalc
:
approval-mozilla-release-
dmeehan
:
approval-mozilla-esr102+
tjr
:
sec-approval+
|
Details | Review |
Crash report: https://crash-stats.mozilla.org/report/index/10c8bbcc-bcb9-4444-9f3f-289540221006
Reason: EXC_BAD_ACCESS / KERN_INVALID_ADDRESS
Top 10 frames of crashing thread:
0 XUL nsCOMPtr_base::assign_assuming_AddRef xpcom/base/nsCOMPtr.h:372
0 XUL nsCOMPtr_base::assign_with_AddRef xpcom/base/nsCOMPtr.cpp:40
1 XUL nsCOMPtr<nsIOutputStreamCallback>::operator= xpcom/base/nsCOMPtr.h:690
1 XUL mozilla::net::TLSTransportLayer::OutputStreamWrapper::AsyncWait netwerk/protocol/http/TLSTransportLayer.cpp:270
2 XUL mozilla::net::TLSTransportLayer::Close netwerk/protocol/http/TLSTransportLayer.cpp:457
3 XUL mozilla::net::WebSocketChannel::CleanupConnection netwerk/protocol/websocket/WebSocketChannel.cpp:2283
4 XUL mozilla::net::WebSocketChannel::DoStopSession netwerk/protocol/websocket/WebSocketChannel.cpp
5 XUL mozilla::net::WebSocketChannel::Notify netwerk/protocol/websocket/WebSocketChannel.cpp
6 XUL {virtual override thunk} netwerk/protocol/websocket/WebSocketChannel.cpp
7 XUL nsTimerImpl::Fire const xpcom/threads/nsTimerImpl.cpp:657
There's a decent number of these crashes. The ones I looked at are crashing on poison values, have WebSocketChannel::DoStopSession() on the stack, and are crashing on the main thread.
| Assignee | ||
Updated•3 years ago
|
| Assignee | ||
Comment 1•3 years ago
|
||
Updated•3 years ago
|
| Reporter | ||
Comment 2•3 years ago
|
||
This signature looks like the same issue: bp-8da3fae9-1551-4a7e-a047-40cd90221007
| Reporter | ||
Comment 3•3 years ago
|
||
I did a search for protosignatures containing WebSocketChannel::CleanupConnection which turned up a number of variant signatures.
bp-cbb0d3e0-c4c7-4977-8483-3f10a0221007
bp-c6cab42b-8149-4c4d-9253-540260221007
[@ mozilla::net::WebSocketChannel::CleanupConnection ] looks like a null deref, unlike the other signatures. bp-e696a3a8-d3c2-487b-ae92-385e90221004
| Reporter | ||
Comment 4•3 years ago
|
||
| Reporter | ||
Comment 5•3 years ago
|
||
esr102 looks like it has the same issue as the patch is fixing, at a glance, but I can't find any UAFs with WebSocketChannel::CleanupConnection in the proto stack, just a couple of hangs, such as: bp-d8b72aaa-56ef-4e72-a26e-125460221007
| Assignee | ||
Comment 6•3 years ago
|
||
Comment on attachment 9297547 [details]
Bug 1794061 - WebSocketChannel::CleanupConnection should run on IO thread, r=#necko
Security Approval Request
- How easily could an exploit be constructed based on the patch?: Unlikely, since this is a racing issue.
- Do comments in the patch, the check-in comment, or tests included in the patch paint a bulls-eye on the security problem?: No
- Which older supported branches are affected by this flaw?: all
- If not all supported branches, which bug introduced the flaw?: None
- Do you have backports for the affected branches?: Yes
- If not, how different, hard to create, and risky will they be?:
- How likely is this patch to cause regressions; how much testing does it need?: Unlikely. This patch is easy and it makes sure
WebSocketChannel::CleanupConnectionwork as expected. - Is Android affected?: Yes
| Reporter | ||
Updated•3 years ago
|
| Assignee | ||
Comment 8•3 years ago
|
||
Hi Tom,
Could you take a look at the sec-approval request?
I think it'd be good to land this in this cycle.
Thanks.
Comment 9•3 years ago
|
||
The last uplifts were Oct 6, from a security perspective an internally discovered race issue generally doesn't need an emergency uplift which is why I hadn't considered it earlier. At this point we are in RC builds so if it is a big stability concern please escalate to RelMan, otherwise we can take it next cycle.
Comment 10•3 years ago
|
||
Comment on attachment 9297547 [details]
Bug 1794061 - WebSocketChannel::CleanupConnection should run on IO thread, r=#necko
Approved to land and uplift once beta branches
| Assignee | ||
Updated•3 years ago
|
Comment 11•3 years ago
|
||
WebSocketChannel::CleanupConnection should run on IO thread, r=necko-reviewers,valentin
https://hg.mozilla.org/integration/autoland/rev/1c029b0ffc31502257687bce117d21804d34c8ef
https://hg.mozilla.org/mozilla-central/rev/1c029b0ffc31
| Assignee | ||
Comment 12•3 years ago
|
||
Comment on attachment 9297547 [details]
Bug 1794061 - WebSocketChannel::CleanupConnection should run on IO thread, r=#necko
Beta/Release Uplift Approval Request
- User impact if declined: Crash.
- Is this code covered by automated tests?: No
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): This is a straightforward change.
- String changes made/needed: N/A
- Is Android affected?: Yes
Comment 13•3 years ago
|
||
Comment on attachment 9297547 [details]
Bug 1794061 - WebSocketChannel::CleanupConnection should run on IO thread, r=#necko
Approved for 107.0b3.
Comment 14•3 years ago
|
||
| uplift | ||
Comment 15•3 years ago
|
||
Please nominate this for ESR102 approval when you get a chance.
| Assignee | ||
Comment 16•3 years ago
|
||
Comment on attachment 9297547 [details]
Bug 1794061 - WebSocketChannel::CleanupConnection should run on IO thread, r=#necko
ESR Uplift Approval Request
- If this is not a sec:{high,crit} bug, please state case for ESR consideration:
- User impact if declined: Could crash.
- Fix Landed on Version: 108
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): A straightforward patch to avoid thread racing.
| Assignee | ||
Comment 17•3 years ago
|
||
I think we might need to uplift this to release as well, since this may be also the root cause of Bug 1796886.
| Assignee | ||
Comment 18•3 years ago
|
||
Comment on attachment 9297547 [details]
Bug 1794061 - WebSocketChannel::CleanupConnection should run on IO thread, r=#necko
Beta/Release Uplift Approval Request
- User impact if declined: Crash
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: N/A
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): A straightforward patch to avoid racing.
- String changes made/needed: N/A
- Is Android affected?: Yes
Comment 19•3 years ago
|
||
Comment on attachment 9297547 [details]
Bug 1794061 - WebSocketChannel::CleanupConnection should run on IO thread, r=#necko
Approved for 102.5esr.
Comment 20•3 years ago
|
||
| uplift | ||
Comment 21•3 years ago
•
|
||
If not all supported branches, which bug introduced the flaw?: None
Maybe the code you fixed hasn't changed in a while, but the crashing from it is clearly a regression in Release 105. Do we know what changed to cause that?
Comment 22•3 years ago
|
||
I'm assuming comment 17 didn't mean to revert the additional signatures mccr8 added
| Assignee | ||
Comment 23•3 years ago
|
||
(In reply to Daniel Veditz [:dveditz] from comment #21)
If not all supported branches, which bug introduced the flaw?: None
Maybe the code you fixed hasn't changed in a while, but the crashing from it is clearly a regression in Release 105. Do we know what changed to cause that?
Sorry for not explaining this clearly.
This regression is caused by bug 1772201, which introduced TLSTransportLayer in 105. TLSTransportLayer is not thread-safe, so accessing it from main thread causing this issue.
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Comment 27•3 years ago
|
||
Copying crash signatures from duplicate bugs.
Comment 28•3 years ago
|
||
Copying crash signatures from duplicate bugs.
Updated•2 years ago
|
Description
•