Skip to content

perfetto: scope RelayPort to explicitly opted-in producer sockets#5908

Open
LalitMaganti wants to merge 1 commit into
mainfrom
dev/lalitm/relay
Open

perfetto: scope RelayPort to explicitly opted-in producer sockets#5908
LalitMaganti wants to merge 1 commit into
mainfrom
dev/lalitm/relay

Conversation

@LalitMaganti
Copy link
Copy Markdown
Member

With --enable-relay-endpoint set and multiple producer sockets bound,
traced exposed the RelayPort IPC service on every one of them,
including local AF_UNIX sockets reachable by unprivileged apps. A local
caller could bind RelayPort and cache forged SystemInfo /
RemoteClockSync data that traced later emitted with its trusted packet
sequence ID, defeating PacketStreamValidator.

Gate RelayPort exposure per ListenEndpoint via a new
expose_relay_endpoint bit honoured by ServiceIPCHostImpl. Add
--enable-relay-endpoint-on= as a narrower variant of
--enable-relay-endpoint that turns RelayPort on only for the named
producer sockets, which must already appear in
PERFETTO_PRODUCER_SOCK_NAME. On Android the init-bound local producer
socket is never relay-capable; traced.relay_producer_port keeps adding
its own relay socket. --enable-relay-endpoint retains its existing
semantics for the common single-socket multi-machine setup.

@LalitMaganti LalitMaganti requested a review from a team as a code owner May 15, 2026 16:20
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 15, 2026

With --enable-relay-endpoint set and multiple producer sockets bound,
traced exposed the RelayPort IPC service on every one of them,
including local AF_UNIX sockets reachable by unprivileged apps. A local
caller could bind RelayPort and cache forged SystemInfo /
RemoteClockSync data that traced later emitted with its trusted packet
sequence ID, defeating PacketStreamValidator.

Gate RelayPort exposure per ListenEndpoint via a new
expose_relay_endpoint bit honoured by ServiceIPCHostImpl. Add
--enable-relay-endpoint-on=<sock> as a narrower variant of
--enable-relay-endpoint that turns RelayPort on only for the named
producer sockets, which must already appear in
PERFETTO_PRODUCER_SOCK_NAME. On Android the init-bound local producer
socket is never relay-capable; traced.relay_producer_port keeps adding
its own relay socket. --enable-relay-endpoint retains its existing
semantics for the common single-socket multi-machine setup.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant