Closed Bug 2054415 Opened 2 months ago Closed 2 months ago

[wayland] Proper wl_fixes version with older host libwayland

Categories

(Core :: Widget: Gtk, defect)

defect

Tracking

()

RESOLVED FIXED
154 Branch
Tracking Status
firefox154 --- fixed

People

(Reporter: zzag, Assigned: zzag)

Details

Attachments

(1 file)

Follow up from https://bugzilla.mozilla.org/show_bug.cgi?id=2044559.

If the host libwayland-client is old (< 1.26), but the compositor announces support for wl_fixes v2, FF can bind wl_fixes v2 even though it shouldn't. If both FF and compositor use the same libwayland, this shouldn't happen, but if the compositor uses a different wayland implementation library, it may.

It should be possible to address the issue by checking wl_interface::version before attempting to bind the wl_fixes global.

Assignee: nobody → vlad.zahorodnii

If the compositor announces the wl_fixes global with a version 2, the
loaded wl_fixes_interface can still have version 1. For example, such a
case may arise if the host libwayland has a version < 1.26, while the
compositor uses a different libwayland implementation.

If we use MIN(version, 2) and wl_fixes_interface->version is 1, then it
is possible to have a read out of bounds when calling
wl_fixes::ack_global_remove().

In order to prevent that, this change adds an additional check: we also
check that the loaded wl_fixes_interface has the right version.

Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 154 Branch
QA Whiteboard: [qa-triage-done-c155/b154]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: