xfree86: Check for RandR provider functions
Changing XRandR provider properties if the driver has set no provider function such as the modesetting driver will cause a NULL pointer dereference and a crash of the Xorg server. Related to CVE-2025-49180 This issue was discovered by Nils Emmerich <nemmerich@ernw.de> and reported by Julian Suleder via ERNW Vulnerability Disclosure. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2024>
This commit is contained in:
parent
3c3a4b767b
commit
0235121c6a
|
|
@ -2146,7 +2146,8 @@ xf86RandR14ProviderSetProperty(ScreenPtr pScreen,
|
||||||
/* If we don't have any property handler, then we don't care what the
|
/* If we don't have any property handler, then we don't care what the
|
||||||
* user is setting properties to.
|
* user is setting properties to.
|
||||||
*/
|
*/
|
||||||
if (config->provider_funcs->set_property == NULL)
|
if (config->provider_funcs == NULL ||
|
||||||
|
config->provider_funcs->set_property == NULL)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -2164,7 +2165,8 @@ xf86RandR14ProviderGetProperty(ScreenPtr pScreen,
|
||||||
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
|
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
|
||||||
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
|
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
|
||||||
|
|
||||||
if (config->provider_funcs->get_property == NULL)
|
if (config->provider_funcs == NULL ||
|
||||||
|
config->provider_funcs->get_property == NULL)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
/* Should be safe even w/o vtSema */
|
/* Should be safe even w/o vtSema */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue