Crash in [@ mozilla::net::nsHttpConnectionMgr::EnsureSocketThreadTarget]
Categories
(Core :: Networking: HTTP, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox159 | --- | affected |
People
(Reporter: clouseau-bot, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: crash, Whiteboard: [necko-triaged])
Crash Data
Attachments
(1 external file)
Crash report: https://crash-stats.mozilla.org/report/index/b2708bf6-378b-4501-93f1-b76f10261002
Crash Reason:
EXCEPTION_ACCESS_VIOLATION_READ at 0x0000000000000000
Top 10 frames:
0 xul.dll mozilla::net::nsHttpConnectionMgr::EnsureSocketThreadTarget() netwerk/protocol/http/nsHttpConnectionMgr.cpp:118
1 xul.dll mozilla::net::nsHttpConnectionMgr::PostEvent(void (mozilla::net::nsHttpConnectio... netwerk/protocol/http/nsHttpConnectionMgr.cpp:252
2 xul.dll mozilla::net::nsHttpConnectionMgr::StoreServerCertHashes(mozilla::net::nsHttpCon... netwerk/protocol/http/nsHttpConnectionMgr.cpp:4158
3 xul.dll mozilla::net::nsHttpChannel::ContinueOnBeforeConnect(bool, nsresult, bool) netwerk/protocol/http/nsHttpChannel.cpp:1270
4 xul.dll mozilla::net::nsHttpChannel::MaybeUseHTTPSRRForUpgrade(bool, nsresult) netwerk/protocol/http/nsHttpChannel.cpp:1129
5 xul.dll std::_Func_impl_no_alloc<`lambda at .\..\..\..\..\..\checkouts\gecko\netwerk\pro...
6 xul.dll mozilla::net::nsHttpChannel::CallOrWaitForResume(std::function<nsresult (mozilla... netwerk/protocol/http/nsHttpChannel.cpp:11925
7 xul.dll mozilla::detail::RunnableFunction<`lambda at .\..\..\..\..\..\checkouts\gecko\ne... xpcom/threads/nsThreadUtils.h:535
8 xul.dll mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal(mozilla::detail... xpcom/threads/TaskController.cpp:1367
9 xul.dll NS_ProcessNextEvent(nsIThread*, bool) xpcom/threads/nsThreadUtils.cpp:471
There is 1 crash in nightly 159 with buildid 20261001214112.
In the last 30 days, Firefox has 1 crash on nightly and 1 crash on release with this signature.
This signature has been reported since build 20141013200257 (2014-10-13), 4371 days before the build above.
This bug looks actionable because:
-
In the parent process,
nsHttpChannel::ContinueOnBeforeConnectcallsStoreServerCertHasheson a nullnsHttpConnectionMgrfor WebTransport channels when networking runs in the socket process, and the read ofmIsShuttingDownfaults.WebTransportSessionProxy::AsyncConnectWithClientsetsmWebTransportSessionEventListeneron every WebTransport channel it opens.nsHttpChannel::ContinueOnBeforeConnectsees that listener and callsgHttpHandler->ConnMgr()->StoreServerCertHashes(...)with no null check (nsHttpChannel.cpp:1270-1272).- With the socket process in use,
nsHttpHandler::InitConnectionMgrmademConnMgranHttpConnectionMgrParent, whoseAsHttpConnectionMgr()returnsnullptr.ConnMgr()guards this only with a debug-onlyMOZ_ASSERT_IF(nsIOService::UseSocketProcess(), XRE_IsSocketProcess()). StoreServerCertHashesruns withthis == nullptr, callsPostEvent, andEnsureSocketThreadTargetreadsmIsShuttingDownfrom the null object (nsHttpConnectionMgr.cpp:118).
The fault is a 4-byte read at
0x30(mov eax, dword [rcx + 0x30]) inside the inlinedAtomic<bool>load on frame 0, which fits a member read from a nullthis. A nullmConnMgrwould instead fault near0x0in the caller. The call site atnsHttpChannel.cpp:1271is the only caller ofStoreServerCertHashes. Look first at that call site: it should either skip or forward the server certificate hashes to the socket process throughHttpConnectionMgrParentwhenConnMgr()is null, rather than calling into it unconditionally. -
The failing code comes from c508a42a91f6 (bug 1873263) by :marten.richter.
Code references:
- mozilla::net::nsHttpChannel::ContinueOnBeforeConnect
- mozilla::net::nsHttpHandler::ConnMgr
- mozilla::net::HttpConnectionMgrParent::AsHttpConnectionMgr
- mozilla::net::nsHttpHandler::InitConnectionMgr
- WebTransportSessionProxy::AsyncConnectWithClient
:valentin, as triage owner, can you have a look please?
Filed automatically by Clouseau, which analyses nightly crashes with an LLM. Nothing above was written or checked by a human. Please close it as INVALID if it is wrong — that is useful feedback, not a nuisance.
This is not an independent Mozilla discovery: the crash is known here only because somebody submitted the crash report linked at the top. If this duplicates an existing report, please resolve THIS bug as the duplicate and leave the credit with the earlier reporter.
Comment 1•1 month ago
|
||
When networking runs in the socket process, gHttpHandler->ConnMgr() returns null in the parent process (mConnMgr is an HttpConnectionMgrParent). nsHttpChannel::ContinueOnBeforeConnect unconditionally called ConnMgr()->StoreServerCertHashes() for WebTransport channels, causing a null-this crash in nsHttpConnectionMgr::EnsureSocketThreadTarget.
WebTransport is not implemented over the socket process yet (HttpTransactionParent::SetIsForWebTransport is a TODO, bug 1791727), so fail such channels with NS_ERROR_NOT_IMPLEMENTED instead. The WebTransport session is then rejected cleanly.
Updated•1 month ago
|
Description
•