xserver/hw
Olivier Fourdan ce6d68d23d xwayland/shm: Avoid integer overflow on large pixmaps
Xwayland's xwl_shm_create_pixmap() computes the size of the shared
memory pool to create using a size_t, yet the Wayland protocol uses an
integer for that size.

If the pool size becomes larger than INT32_MAX, we end up asking Wayland
to create a shared memory pool of negative size which in turn will raise
a protocol error which terminates the Wayland connection, and therefore
Xwayland.

Avoid that issue early by return a NULL pixmap in that case, which will
trigger a BadAlloc error, but leave Xwayland alive.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
(cherry picked from commit 079c5ccbcd)
2021-10-18 14:17:28 +02:00
..
vfb Don't install Xvfb 2021-02-03 18:22:18 +01:00
xwayland xwayland/shm: Avoid integer overflow on large pixmaps 2021-10-18 14:17:28 +02:00
meson.build Drop Xephyr / kdrive DDX 2021-02-03 18:13:15 +01:00