Closed Bug 2079995 Opened 1 month ago Closed 1 month ago

[wpt-sync] Sync PR 63392 - Set WebSocketCommon state to kClosed when WebSocketStream aborts

Categories

(Core :: Networking: WebSockets, task, P4)

task

Tracking

()

RESOLVED FIXED
160 Branch
Tracking Status
firefox160 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Attachments

(1 file)

Sync web-platform-tests PR 63392 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/63392
Details from upstream follow.

Adam Rice <ricea@chromium.org> wrote:

Set WebSocketCommon state to kClosed when WebSocketStream aborts

When WebSocketStream::OnAbort() cancelled the handshake and reset
channel_ to nullptr, it left common_ in the kConnecting state. Calling
close() afterwards passed a null channel_ to
WebSocketCommon::CloseInternal() while in kConnecting, causing a null
pointer dereference in WebSocketChannelImpl::Fail().

Similarly, when WebSocketStream::Connect() returned early due to an
already-aborted signal, common_ remained in kConnecting and channel_ was
not cleared, keeping HasPendingActivity() true and causing subsequent
close() calls to fail an unconnected channel.

Set common_ to kClosed and clear channel_ in both abort paths, and clear
channel_ and abort_handle_ when Connect() fails asynchronously.

Fixed: 432920899
Change-Id: I2a827bba93ee1aa7e1743b2b28c9a0654478a315
Reviewed-on: https://chromium-review.googlesource.com/8522181
WPT-Export-Revision: 0db638a36a93f736ee2dd46adde804c725eefc04

Component: web-platform-tests → Networking: WebSockets
Product: Testing → Core
Attached file Notable wpt changes —

CI Results

Ran 8 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 84 tests and 6 subtests

Status Summary

Firefox

OK : 8[GitHub] 84[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL : 40[GitHub] 652[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]

Chrome

CRASH: 8

Safari

OK : 8
FAIL : 40

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

(See attachment for full changes)

Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 160 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: