mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
Disable all output leasing due to a wlroots UAF
This commit is contained in:
parent
4699d446cb
commit
38a1a9bbbc
2 changed files with 13 additions and 0 deletions
|
|
@ -3,6 +3,7 @@
|
||||||
#define LABWC_MACROS_H
|
#define LABWC_MACROS_H
|
||||||
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
#include <wlr/version.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ARRAY_SIZE() - Get the number of elements in array.
|
* ARRAY_SIZE() - Get the number of elements in array.
|
||||||
|
|
@ -61,4 +62,7 @@
|
||||||
#define BOUNDED_INT(a) ((a) < INT_MAX && (a) > INT_MIN)
|
#define BOUNDED_INT(a) ((a) < INT_MAX && (a) > INT_MIN)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define LAB_WLR_VERSION_AT_LEAST(major, minor, micro) \
|
||||||
|
(WLR_VERSION_NUM >= (((major) << 16) | ((minor) << 8) | (micro)))
|
||||||
|
|
||||||
#endif /* LABWC_MACROS_H */
|
#endif /* LABWC_MACROS_H */
|
||||||
|
|
|
||||||
|
|
@ -445,11 +445,20 @@ handle_new_output(struct wl_listener *listener, void *data)
|
||||||
* to use planes and present directly.
|
* to use planes and present directly.
|
||||||
* This is also useful for debugging the DRM parts of
|
* This is also useful for debugging the DRM parts of
|
||||||
* another compositor.
|
* another compositor.
|
||||||
|
*
|
||||||
|
* All drm leasing is disabled due to a UAF bug in wlroots.
|
||||||
|
* We assume that the fix will be backported to 0.19.1 and thus
|
||||||
|
* check for a version >= 0.19.1. See following link for the fix status:
|
||||||
|
* https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/5104
|
||||||
|
*
|
||||||
|
* TODO: remove once labwc starts tracking 0.20.x and the fix has been merged.
|
||||||
*/
|
*/
|
||||||
|
#if LAB_WLR_VERSION_AT_LEAST(0, 19, 1)
|
||||||
if (server->drm_lease_manager && wlr_output_is_drm(wlr_output)) {
|
if (server->drm_lease_manager && wlr_output_is_drm(wlr_output)) {
|
||||||
wlr_drm_lease_v1_manager_offer_output(
|
wlr_drm_lease_v1_manager_offer_output(
|
||||||
server->drm_lease_manager, wlr_output);
|
server->drm_lease_manager, wlr_output);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Don't configure any non-desktop displays, such as VR headsets;
|
* Don't configure any non-desktop displays, such as VR headsets;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue