Sanitize cursor theme name and size in GTK and Wayland [chromium/src : main]

1 view
Skip to first unread message

Thomas Anderson (Gerrit)

unread,
Jul 29, 2026, 5:21:35 PMJul 29
to Yichen Zhou, chromium...@chromium.org, Henrique Ferreiro, Sadrul Chowdhury, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org
Attention needed from Yichen Zhou

Thomas Anderson voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Yichen Zhou
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ibe8a3ce208d76d2e724902424491a6116d4352f6
Gerrit-Change-Number: 8164559
Gerrit-PatchSet: 2
Gerrit-Owner: Thomas Anderson <thomasa...@chromium.org>
Gerrit-Reviewer: Thomas Anderson <thomasa...@chromium.org>
Gerrit-Reviewer: Yichen Zhou <yic...@chromium.org>
Gerrit-CC: Henrique Ferreiro <hfer...@igalia.com>
Gerrit-CC: Sadrul Chowdhury <sad...@chromium.org>
Gerrit-Attention: Yichen Zhou <yic...@chromium.org>
Gerrit-Comment-Date: Wed, 29 Jul 2026 21:21:25 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Yichen Zhou (Gerrit)

unread,
Jul 29, 2026, 5:33:36 PMJul 29
to Thomas Anderson, Chromium LUCI CQ, chromium...@chromium.org, Henrique Ferreiro, Sadrul Chowdhury, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org
Attention needed from Thomas Anderson

Yichen Zhou added 1 comment

Patchset-level comments
File-level comment, Patchset 2 (Latest):
Yichen Zhou . resolved

Hi can you cc me on https://g-issues.chromium.org/issues/540289900? I don't have access to the bug

Open in Gerrit

Related details

Attention is currently required from:
  • Thomas Anderson
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ibe8a3ce208d76d2e724902424491a6116d4352f6
Gerrit-Change-Number: 8164559
Gerrit-PatchSet: 2
Gerrit-Owner: Thomas Anderson <thomasa...@chromium.org>
Gerrit-Reviewer: Thomas Anderson <thomasa...@chromium.org>
Gerrit-Reviewer: Yichen Zhou <yic...@chromium.org>
Gerrit-CC: Henrique Ferreiro <hfer...@igalia.com>
Gerrit-CC: Sadrul Chowdhury <sad...@chromium.org>
Gerrit-Attention: Thomas Anderson <thomasa...@chromium.org>
Gerrit-Comment-Date: Wed, 29 Jul 2026 21:33:22 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Thomas Anderson (Gerrit)

unread,
Jul 29, 2026, 5:42:00 PMJul 29
to Chromium LUCI CQ, Yichen Zhou, chromium...@chromium.org, Henrique Ferreiro, Sadrul Chowdhury, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org
Attention needed from Yichen Zhou

Thomas Anderson added 1 comment

Patchset-level comments
Yichen Zhou . resolved

Hi can you cc me on https://g-issues.chromium.org/issues/540289900? I don't have access to the bug

Thomas Anderson

done

Open in Gerrit

Related details

Attention is currently required from:
  • Yichen Zhou
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ibe8a3ce208d76d2e724902424491a6116d4352f6
Gerrit-Change-Number: 8164559
Gerrit-PatchSet: 2
Gerrit-Owner: Thomas Anderson <thomasa...@chromium.org>
Gerrit-Reviewer: Thomas Anderson <thomasa...@chromium.org>
Gerrit-Reviewer: Yichen Zhou <yic...@chromium.org>
Gerrit-CC: Henrique Ferreiro <hfer...@igalia.com>
Gerrit-CC: Sadrul Chowdhury <sad...@chromium.org>
Gerrit-Attention: Yichen Zhou <yic...@chromium.org>
Gerrit-Comment-Date: Wed, 29 Jul 2026 21:41:47 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Yichen Zhou <yic...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Yichen Zhou (Gerrit)

unread,
Jul 29, 2026, 5:50:25 PMJul 29
to Thomas Anderson, Chromium LUCI CQ, chromium...@chromium.org, Henrique Ferreiro, Sadrul Chowdhury, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org
Attention needed from Thomas Anderson

Yichen Zhou voted and added 1 comment

Votes added by Yichen Zhou

Code-Review+1

1 comment

Patchset-level comments
Yichen Zhou . resolved

Hi can you cc me on https://g-issues.chromium.org/issues/540289900? I don't have access to the bug

Thomas Anderson

done

Yichen Zhou

Sorry, do you mind cc yic...@google.com too?

Open in Gerrit

Related details

Attention is currently required from:
  • Thomas Anderson
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ibe8a3ce208d76d2e724902424491a6116d4352f6
Gerrit-Change-Number: 8164559
Gerrit-PatchSet: 2
Gerrit-Owner: Thomas Anderson <thomasa...@chromium.org>
Gerrit-Reviewer: Thomas Anderson <thomasa...@chromium.org>
Gerrit-Reviewer: Yichen Zhou <yic...@chromium.org>
Gerrit-CC: Henrique Ferreiro <hfer...@igalia.com>
Gerrit-CC: Sadrul Chowdhury <sad...@chromium.org>
Gerrit-Attention: Thomas Anderson <thomasa...@chromium.org>
Gerrit-Comment-Date: Wed, 29 Jul 2026 21:50:16 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Yichen Zhou <yic...@chromium.org>
Comment-In-Reply-To: Thomas Anderson <thomasa...@chromium.org>
satisfied_requirement
open
diffy

Yichen Zhou (Gerrit)

unread,
Jul 29, 2026, 5:50:53 PMJul 29
to Thomas Anderson, Chromium LUCI CQ, chromium...@chromium.org, Henrique Ferreiro, Sadrul Chowdhury, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org
Attention needed from Thomas Anderson

Yichen Zhou added 1 comment

Patchset-level comments
Yichen Zhou . resolved

Hi can you cc me on https://g-issues.chromium.org/issues/540289900? I don't have access to the bug

Thomas Anderson

done

Yichen Zhou

Sorry, do you mind cc yic...@google.com too?

Yichen Zhou

Please ignore the above comment 😅

Gerrit-Comment-Date: Wed, 29 Jul 2026 21:50:43 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
open
diffy

Thomas Anderson (Gerrit)

unread,
Jul 29, 2026, 9:23:44 PMJul 29
to Yichen Zhou, Chromium LUCI CQ, chromium...@chromium.org, Henrique Ferreiro, Sadrul Chowdhury, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org

Thomas Anderson voted Commit-Queue+2

Commit-Queue+2
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ibe8a3ce208d76d2e724902424491a6116d4352f6
Gerrit-Change-Number: 8164559
Gerrit-PatchSet: 2
Gerrit-Owner: Thomas Anderson <thomasa...@chromium.org>
Gerrit-Reviewer: Thomas Anderson <thomasa...@chromium.org>
Gerrit-Reviewer: Yichen Zhou <yic...@chromium.org>
Gerrit-CC: Henrique Ferreiro <hfer...@igalia.com>
Gerrit-CC: Sadrul Chowdhury <sad...@chromium.org>
Gerrit-Comment-Date: Thu, 30 Jul 2026 01:23:23 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Chromium LUCI CQ (Gerrit)

unread,
Jul 29, 2026, 9:50:18 PMJul 29
to Thomas Anderson, Yichen Zhou, chromium...@chromium.org, Henrique Ferreiro, Sadrul Chowdhury, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org

Chromium LUCI CQ submitted the change

Change information

Commit message:
Sanitize cursor theme name and size in GTK and Wayland

This change extends GtkSettingsSetProperty interceptor and GtkUi to
sanitize gtk-cursor-theme-name and gtk-cursor-theme-size at write-time,
preventing unsanitized cursor theme names from being set in GTK
settings.

It also introduces unified ui::IsValidCursorThemeName and
ui::IsValidCursorThemeSize validation helpers in //ui/base/cursor, and
adds validation to WaylandCursorFactory to ensure invalid or
path-traversing cursor theme names are rejected before calling
wl_cursor_theme_load.
Change-Id: Ibe8a3ce208d76d2e724902424491a6116d4352f6
Fixed: 540289900
Reviewed-by: Yichen Zhou <yic...@chromium.org>
Commit-Queue: Thomas Anderson <thomasa...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1670761}
Files:
  • M ui/base/cursor/cursor_factory.cc
  • M ui/base/cursor/cursor_factory.h
  • M ui/base/cursor/cursor_unittest.cc
  • M ui/base/x/x11_cursor_loader.cc
  • M ui/gtk/gtk_ui.cc
  • M ui/gtk/gtk_ui.h
  • M ui/gtk/gtk_util.cc
  • M ui/gtk/gtk_util.h
  • M ui/gtk/gtk_util_unittest.cc
  • M ui/ozone/platform/wayland/host/wayland_cursor_factory.cc
Change size: M
Delta: 10 files changed, 161 insertions(+), 7 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Yichen Zhou
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ibe8a3ce208d76d2e724902424491a6116d4352f6
Gerrit-Change-Number: 8164559
Gerrit-PatchSet: 3
Gerrit-Owner: Thomas Anderson <thomasa...@chromium.org>
Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
Gerrit-Reviewer: Thomas Anderson <thomasa...@chromium.org>
Gerrit-Reviewer: Yichen Zhou <yic...@chromium.org>
open
diffy
satisfied_requirement

Antonio Alphonse (Gerrit)

unread,
Aug 3, 2026, 11:12:18 AM (10 days ago) Aug 3
to Chromium LUCI CQ, Thomas Anderson, Yichen Zhou, chromium...@chromium.org, Henrique Ferreiro, Sadrul Chowdhury, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org

Antonio Alphonse has created a revert of this change

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: revert
satisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages