← WebKit — 2026-W35

0c2c3da31e37476bd95d06f17af5143eae171ec0  REGRESSION(316854@main): CertificateInfo is not sent to the UI process for service worker fetch loads

severity medium class Spoofing confidence 0.4 signal score 9.72 Source/WebKit/NetworkProcess
Primitive: service-worker-served main resource response did not propagate its certificate info to the UI frame
Triage note: Adds fetchTaskReceivedMainResourceResponse so a ServiceWorker main-resource response sends the worker/response CertificateInfo to WebFrameProxy. Fixes correct security-state (lock icon/cert) attribution for SW navigations, but it is wiring/logic, not a memory-safety bug.
Structural signals: smartptr_member_added (+6.47), null_guard (+1.95), surgical (+1.3)

Commit message

REGRESSION(316854@main): CertificateInfo is not sent to the UI process for service worker fetch loads
https://bugs.webkit.org/show_bug.cgi?id=322485

Reviewed by Alex Christensen.

ServiceWorkerFetchTask::processResponse() passes the response to the
loader by calling sendDidReceiveResponseWithPotentialProcessSwap(), so
didReceiveMainResourceResponse(), that sends the certificate info the UI
process, is not called.

This patch adds WebSWServerConnection::fetchTaskReceivedMainResourceResponse()
that is called from ServiceWorkerFetchTask::processResponse() for main frame
loads to send the ReceivedMainResourceResponseWithCertificateInfo to the UI process.

* Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp:
(WebKit::ServiceWorkerFetchTask::processResponse):
* Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:
(WebKit::WebSWServerConnection::fetchTaskReceivedMainResourceResponse):
(WebKit::WebSWServerConnection::resolveUnregistrationJobInClient):
* Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerConnection.h:

Canonical link: https://commits.webkit.org/319948@main

Before / after

Loading diff…