Skip to main content

capture security

ScreenCast session creation and Screenshot requests require the supervised shell process or the installed GNOME portal backend. The compositor resolves the caller's unique D-Bus name to its bus-authenticated Unix PID. Portal admission additionally checks ownership of org.freedesktop.impl.portal.desktop.gnome and that /proc/PID/exe identifies the root-owned, non-group/world-writable installed /usr/libexec/xdg-desktop-portal-gnome or /usr/lib/xdg-desktop-portal-gnome executable. Claiming a well-known name alone does not grant capture. There is no capture test environment bypass. Window introspection shares the same admission and locked-session gate; its existing explicit unrestricted debug setting only permits metadata while unlocked.

The portal is the trusted consent broker; this check authenticates the broker, rather than implementing its picker. Applications must use the external desktop portal. The supervised shell's screenshot UI supplies explicit local selection and Capture actions. The shell's public recorder D-Bus methods deny external calls, so an arbitrary caller cannot borrow the shell's trusted compositor connection.

Each ScreenCast session belongs to its unique creator. Only that creator may add streams, start or stop it. Start is single-use, streams cannot be added after Start, and revocation is permanent. Registries admit at most 256 sessions and 64 streams per session. The compositor denies queued starts when locked or already revoked; lock closes all active PipeWire streams in its next tick, and existing offscreen capture paths also refuse locked frames. Idle dimming or blanking before lock does not itself revoke a grant.

The D-Bus service scans grants every 100 ms. Losing the creator connection, the trusted portal name, the supervised shell PID or unlocked state revokes the grant and queues stream teardown. The normal disconnect teardown latency is the scan interval plus one compositor tick; this is not a hard real-time guarantee under CPU starvation. Explicit Stop revokes immediately before queuing teardown. Closed session/stream objects are removed from the bus and registry.

The packaged portal-security lane uses the installed GNOME 51 backend and portal frontend with the CI-built compositor and GTK shell. It records package versions and the exact candidate merge commit. Applications exercise real Cancel/Share consent, OpenPipeWireRemote and a decoded frame. Foreign owners, ordinary unknown callers and a forged portal name are denied. Owner Close, frontend/backend disconnect and lock remove the PipeWire node; the accepted journey requires removal within two seconds. The Ubuntu GTK lane additionally proves UI Stop and active recording revocation on lock, with unchanged accessibility goldens.

Remote Desktop shares this authenticated authority and binds keyboard/pointer and linked ScreenCast grants to their original caller. RemoteDesktop.CreateSession, and only the ScreenCast session linked to that grant, additionally admit the installed root-owned gnome-remote-desktop daemon by executable identity and grd bus name; it gets no other capture API. Its independent installed libei client must deliver real GTK key/button events, then prove node withdrawal, no further input and an empty held seat on revocation. See Remote Desktop for bounds and unsupported capabilities.

Screenshot uses the installed GTK backend only for its Access consent UI. Deny returns no URI; Allow must yield a readable image. An authenticated locked request returns the documented false/empty result without scheduling capture, and the proof requires an empty frontend URI and unchanged saved-image hashes. Unknown callers retain AccessDenied. See Screenshot consent.

The dated qualification manifest records actual current-head runs, candidate parents, runtime versions and retained artifacts. Issue #61's consent, real-stream, bounded-revocation and locked-denial acceptance is separate from full GNOME parity: touch, text input, interactive portal screenshot customization, area/color selection, cursor metadata and dmabuf zero-copy remain explicit limitations (keysyms and the session clipboard are implemented for #358). P-SY-05 therefore remains partial.