Skip to content

Don't allow subsurface parent-child loops#4881

Open
robert-ancell wants to merge 7 commits intomainfrom
subsurface-checks
Open

Don't allow subsurface parent-child loops#4881
robert-ancell wants to merge 7 commits intomainfrom
subsurface-checks

Conversation

@robert-ancell
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings April 21, 2026 22:07
@robert-ancell robert-ancell requested a review from a team as a code owner April 21, 2026 22:07
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds protocol-level validation to wl_subcompositor.get_subsurface to prevent clients from creating invalid subsurface parent relationships (including obvious self-parenting).

Changes:

  • Rejects get_subsurface when the child surface is the same resource as the parent.
  • Adds a check intended to prevent parent/child cycles by rejecting certain parent choices before creating the WlSubsurface.

Comment thread src/server/frontend_wayland/wl_subcompositor.cpp
Comment thread src/server/frontend_wayland/wl_subcompositor.cpp Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI and others added 2 commits April 21, 2026 23:09
Agent-Logs-Url: https://github.com/canonical/mir/sessions/d394a7de-811d-491e-945c-4e077e3eab2f

Co-authored-by: robert-ancell <126560+robert-ancell@users.noreply.github.com>
Agent-Logs-Url: https://github.com/canonical/mir/sessions/d394a7de-811d-491e-945c-4e077e3eab2f

Co-authored-by: robert-ancell <126560+robert-ancell@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@RAOF RAOF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the small fix, yeah.

Comment thread src/server/frontend_wayland/wl_surface.cpp Outdated
@robert-ancell robert-ancell requested a review from RAOF April 22, 2026 21:43
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.

4 participants