Closed Bug 1801315 Opened 3 years ago Closed 3 years ago

BaseWebSocketChannel releases LoadInfo on a wrong thread.

Categories

(Core :: Networking, defect, P2)

defect

Tracking

()

RESOLVED FIXED
109 Branch
Tracking Status
firefox-esr102 108+ fixed
firefox107 --- wontfix
firefox108 + fixed
firefox109 + fixed

People

(Reporter: smaug, Assigned: smaug)

References

Details

(Keywords: csectype-race, sec-high, Whiteboard: [necko-triaged][post-critsmash-triage][adv-main108+r][adv-esr102.6+r])

Attachments

(2 external files)

There is this: https://searchfox.org/mozilla-central/rev/aa329cf7506ddd966542e642ec00223fd7461599/netwerk/protocol/websocket/WebSocketChannel.cpp#1228, but the crash happens with WebSocketChannelChild, not WebSocketChannel. Those both extend BaseWebSocketChannel.

Looks like we had a variant of this bug also 8 years ago https://bugzilla.mozilla.org/show_bug.cgi?id=1072316.

I guess I could just fix this.

Assignee: nobody → smaug
Group: core-security → network-core-security

Comment on attachment 9304147 [details]
Bug 1801315, move some generic code to the baseclass, r=jesup

Security Approval Request

  • How easily could an exploit be constructed based on the patch?: The crash report does hint quite a bit how one might write an exploit, though I couldn't immediately write a test which causes a crash.
  • Do comments in the patch, the check-in comment, or tests included in the patch paint a bulls-eye on the security problem?: Unknown
  • 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?: No
  • If not, how different, hard to create, and risky will they be?: esr102 needs a minor tweak. Basically one of the lines removed from WebSocketChannel::~WebSocketChannel() isn't there on esr102 because of bug 1778272. I'll upload the esr102 patch in a moment.
  • How likely is this patch to cause regressions; how much testing does it need?: I think this should be rather safe. We don't end up to this code path too often on a worker thread (otherwise we'd have more crash reports) and this makes the WebSocketChannelChild work like WebSocketChannel
  • Is Android affected?: Yes
Attachment #9304147 - Flags: sec-approval?
Severity: -- → S3
Priority: -- → P2
Whiteboard: [necko-triaged]

The severity field for this bug is set to S3. However, the bug is flagged with the sec-high keyword.
:smaug, could you consider increasing the severity of this security bug?

For more information, please visit auto_nag documentation.

Flags: needinfo?(smaug)

The bug is marked as tracked for firefox108 (beta) and tracked for firefox109 (nightly). However, the bug still has low severity.

:ghess, could you please increase the severity for this tracked bug? If you disagree with the tracking decision, please talk with the release managers.

For more information, please visit auto_nag documentation.

Flags: needinfo?(ghess)
Flags: needinfo?(smaug)

Comment on attachment 9304147 [details]
Bug 1801315, move some generic code to the baseclass, r=jesup

Approved to land and uplift

Attachment #9304147 - Flags: sec-approval? → sec-approval+
Flags: needinfo?(ghess)
Group: network-core-security → core-security-release
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 109 Branch

The patch landed in nightly and beta is affected.
:smaug, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox108 to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(smaug)

Comment on attachment 9304147 [details]
Bug 1801315, move some generic code to the baseclass, r=jesup

Beta/Release Uplift Approval Request

  • User impact if declined: sec-high crash
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: No
  • If yes, steps to reproduce: The patch is based on the crash report's stack trace. I tried to write a testcase but failed.
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): I believe this should be quite low risk. The crash itself is happening rarely so the new behavior shouldn't be triggered too often either.
  • String changes made/needed:
  • Is Android affected?: Yes
Flags: needinfo?(smaug)
Attachment #9304147 - Flags: approval-mozilla-beta?

Comment on attachment 9304191 [details]
Bug 1801315, move some generic code to the baseclass, esr102, r=jesup

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration:
  • User impact if declined: sec-high crash
  • Fix Landed on Version: 109
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): I believe this should be quite low risk. The crash itself is happening rarely so the new behavior shouldn't be triggered too often either.

This patch has the same behavior as the m-c one, but esr102 just needed a small tweak

Attachment #9304191 - Flags: approval-mozilla-esr102?

Comment on attachment 9304147 [details]
Bug 1801315, move some generic code to the baseclass, r=jesup

Approved for 108.0b6.

Attachment #9304147 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Comment on attachment 9304191 [details]
Bug 1801315, move some generic code to the baseclass, esr102, r=jesup

Approved for 102.6esr.

Attachment #9304191 - Flags: approval-mozilla-esr102? → approval-mozilla-esr102+
Flags: qe-verify-
Whiteboard: [necko-triaged] → [necko-triaged][post-critsmash-triage]
Whiteboard: [necko-triaged][post-critsmash-triage] → [necko-triaged][post-critsmash-triage][adv-main108+r]
Whiteboard: [necko-triaged][post-critsmash-triage][adv-main108+r] → [necko-triaged][post-critsmash-triage][adv-main108+r][adv-esr102.6+r]
Group: core-security-release
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: