!151 fix CVE-2023-1393
From: @leeffo Reviewed-by: @weidongkl Signed-off-by: @weidongkl
This commit is contained in:
commit
0285bb3d9b
42
backport-CVE-2023-1393.patch
Normal file
42
backport-CVE-2023-1393.patch
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
From 26ef545b3502f61ca722a7a3373507e88ef64110 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Olivier Fourdan <ofourdan@redhat.com>
|
||||||
|
Date: Mon, 13 Mar 2023 11:08:47 +0100
|
||||||
|
Subject: [PATCH xserver] composite: Fix use-after-free of the COW
|
||||||
|
|
||||||
|
ZDI-CAN-19866/CVE-2023-1393
|
||||||
|
|
||||||
|
If a client explicitly destroys the compositor overlay window (aka COW),
|
||||||
|
we would leave a dangling pointer to that window in the CompScreen
|
||||||
|
structure, which will trigger a use-after-free later.
|
||||||
|
|
||||||
|
Make sure to clear the CompScreen pointer to the COW when the latter gets
|
||||||
|
destroyed explicitly by the client.
|
||||||
|
|
||||||
|
This vulnerability was discovered by:
|
||||||
|
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
|
||||||
|
|
||||||
|
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
|
||||||
|
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
||||||
|
---
|
||||||
|
composite/compwindow.c | 5 +++++
|
||||||
|
1 file changed, 5 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/composite/compwindow.c b/composite/compwindow.c
|
||||||
|
index 4e2494b86..b30da589e 100644
|
||||||
|
--- a/composite/compwindow.c
|
||||||
|
+++ b/composite/compwindow.c
|
||||||
|
@@ -620,6 +620,11 @@ compDestroyWindow(WindowPtr pWin)
|
||||||
|
ret = (*pScreen->DestroyWindow) (pWin);
|
||||||
|
cs->DestroyWindow = pScreen->DestroyWindow;
|
||||||
|
pScreen->DestroyWindow = compDestroyWindow;
|
||||||
|
+
|
||||||
|
+ /* Did we just destroy the overlay window? */
|
||||||
|
+ if (pWin == cs->pOverlayWin)
|
||||||
|
+ cs->pOverlayWin = NULL;
|
||||||
|
+
|
||||||
|
/* compCheckTree (pWin->drawable.pScreen); can't check -- tree isn't good*/
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.40.0
|
||||||
|
|
||||||
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
Name: xorg-x11-server
|
Name: xorg-x11-server
|
||||||
Version: 1.20.8
|
Version: 1.20.8
|
||||||
Release: 17
|
Release: 18
|
||||||
Summary: X.Org X11 X server
|
Summary: X.Org X11 X server
|
||||||
License: MIT and GPLv2
|
License: MIT and GPLv2
|
||||||
URL: https://www.x.org
|
URL: https://www.x.org
|
||||||
@ -104,6 +104,7 @@ Patch6014: backport-Xi-return-an-error-from-XI-property-changes-if-verification-
|
|||||||
Patch6015: backport-CVE-2022-46344.patch
|
Patch6015: backport-CVE-2022-46344.patch
|
||||||
Patch6016: backport-CVE-2022-4283.patch
|
Patch6016: backport-CVE-2022-4283.patch
|
||||||
Patch6017: backport-CVE-2023-0494.patch
|
Patch6017: backport-CVE-2023-0494.patch
|
||||||
|
Patch6018: backport-CVE-2023-1393.patch
|
||||||
|
|
||||||
BuildRequires: audit-libs-devel autoconf automake bison dbus-devel flex flex-devel git gcc
|
BuildRequires: audit-libs-devel autoconf automake bison dbus-devel flex flex-devel git gcc
|
||||||
BuildRequires: systemtap-sdt-devel libtool pkgconfig
|
BuildRequires: systemtap-sdt-devel libtool pkgconfig
|
||||||
@ -346,6 +347,9 @@ find %{inst_srcdir}/hw/xfree86 -name \*.c -delete
|
|||||||
%{_libdir}/xorg/protocol.txt
|
%{_libdir}/xorg/protocol.txt
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Apr 13 2023 liweiganga <liweiganga@uniontech.com> -1.20.8-18
|
||||||
|
- fix CVE-2023-1393
|
||||||
|
|
||||||
* Fri Feb 17 2023 liweiganga <liweiganga@uniontech.com> -1.20.8-17
|
* Fri Feb 17 2023 liweiganga <liweiganga@uniontech.com> -1.20.8-17
|
||||||
- fix CVE-2023-0494
|
- fix CVE-2023-0494
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user