Skip to content

desktop: verify the owned Xvfb before pointer input #219

Closed

Description

@ElbertePlinio

Problem

Pointer input (click, doubleClick, drag, move, scroll in packages/desktop-linux/src/input.ts) runs xdotool against the display in the session record. It does not check that this display still belongs to the session's owned Xvfb. Typing does check this through validateTypingTarget. If the owned Xvfb dies and another X server takes the same display number, pointer input could reach that server.

Where it was found

Design review for #199 in PR #218. That PR records the xvfb-root coordinate space only when verifyOwnedDisplayTarget confirms the owned Xvfb before and after the action. It deliberately leaves input unchanged, because #199 must not change input.

Acceptance criteria

  • Pointer input verifies the session's owned Xvfb identity (pid, start ticks, lock and listening socket) before dispatch, and fails closed.
  • The window between the check and dispatch is handled or documented, as the typing anchor does.
  • The check stays bounded in time and never reads host DISPLAY, XAUTHORITY or home configuration.

Checklist

Activity

  1. added
    enhancement
    on Oct 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions