← All issues

[Site Isolation] Web Inspector: add ProxyingPageAgent and PageAgentProxy stubs for cross-process Page domain

6fd4b1f

Web Inspector는 domain-agent 모델을 사용합니다. 각 프로토콜 도메인에 해당 서브시스템을 계측하는 agent가 대응됩니다. Site Isolation 환경에서는 cross-origin iframe이 별도의 WebContent process에서 실행되므로, 단일 InspectorPageAgent는 로컬에서 호스팅하는 frame만 관찰할 수 있습니다. "octopus pattern"은 각 WebContent process에 경량 proxy agent를 두고 계측 이벤트를 IPC를 통해 UIProcess의 ProxyingAgent로 전달하는데, ProxyingAgent가 이를 받아 protocol 이벤트를 frontend로 분배합니다. 이 commit은 해당 패턴을 Network 도메인에서 Page 도메인으로 이식했습니다.

Source/WebCore/inspector/InstrumentingAgents.h

+#define DEFINE_INSPECTOR_AGENT_PageProxy(macro, Getter, Setter) \
+ DEFINE_INSPECTOR_AGENT(macro, Inspector::PageAgentInstrumentation, PageProxy, Getter, Setter)

renderer에서 UIProcess로 전달되는 IPC 메시지는 FrameNavigated, DomContentEventFired, LoadEventFired, FrameDetached 네 가지입니다. m_pinnedInstrumentedProcesses는 계측이 활성화된 동안 Ref<WebProcessProxy>를 고정하여, IPC receiver가 항상 안전하게 제거될 수 있도록 보장합니다. Page 백엔드 명령(getResourceTree, reload, getCookies)은 후속 버그 처리를 위해 오류 응답으로 stub 처리되었습니다.

침해 가능성이 있는 renderer process에서 inspector의 UIProcess 측 agent로 이어지는 새로운 IPC attack surface를 생성합니다. 권한 있는 UIProcess에서 attacker가 제어할 수 있는 파라미터를 포함한 네 가지 메시지가 처리됩니다.

🔒

New cross-process IPC surface with complex dual-lifecycle management — several interaction edge cases in this infrastructure are worth security investigation.

더 확인하려면 구독해 주세요