From 70b8fa97549489ab85e51644977f6815816f444e Mon Sep 17 00:00:00 2001 From: ouyanglearnning Date: Fri, 22 Jul 2022 10:24:03 +0800 Subject: [PATCH] Fixed a crash when the shadowUpdatePacked function and the Nvidia driver function were called --- ...-shadowUpdatePacked-because-of-memcp.patch | 26 +++++++++++++++++++ ...sent_scmd_get_crtc-and-present_flush.patch | 23 ++++++++++++++++ xorg-x11-server.spec | 11 ++++++-- 3 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 0001-Fix-the-crash-in-shadowUpdatePacked-because-of-memcp.patch create mode 100644 0002-present-Crash-in-present_scmd_get_crtc-and-present_flush.patch diff --git a/0001-Fix-the-crash-in-shadowUpdatePacked-because-of-memcp.patch b/0001-Fix-the-crash-in-shadowUpdatePacked-because-of-memcp.patch new file mode 100644 index 0000000..bcf68ca --- /dev/null +++ b/0001-Fix-the-crash-in-shadowUpdatePacked-because-of-memcp.patch @@ -0,0 +1,26 @@ +From de7b67924425b3aa540c19c8431ff0d7c5892608 Mon Sep 17 00:00:00 2001 +From: rpm-build +Date: Tue, 24 May 2022 09:49:36 +0800 +Subject: [PATCH] Fix the crash in shadowUpdatePacked because of memcpy acts + randomly with overlapping areas. + +Signed-off-by: tangjie02 +--- + miext/shadow/shpacked.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/miext/shadow/shpacked.c b/miext/shadow/shpacked.c +index 5220854..8b16a98 100644 +--- a/miext/shadow/shpacked.c ++++ b/miext/shadow/shpacked.c +@@ -98,7 +98,7 @@ shadowUpdatePacked(ScreenPtr pScreen, shadowBufPtr pBuf) + i = width; + width -= i; + scr += i; +- memcpy(win, sha, i * sizeof(FbBits)); ++ memmove(win, sha, i * sizeof(FbBits)); + sha += i; + } + shaLine += shaStride; +-- +2.33.0 diff --git a/0002-present-Crash-in-present_scmd_get_crtc-and-present_flush.patch b/0002-present-Crash-in-present_scmd_get_crtc-and-present_flush.patch new file mode 100644 index 0000000..282ab52 --- /dev/null +++ b/0002-present-Crash-in-present_scmd_get_crtc-and-present_flush.patch @@ -0,0 +1,23 @@ +diff --git a/present/present_scmd.c b/present/present_scmd.c +index da836ea6b..239055bc1 100644 +--- a/present/present_scmd.c ++++ b/present/present_scmd.c +@@ -158,6 +158,9 @@ present_scmd_get_crtc(present_screen_priv_ptr screen_priv, WindowPtr window) + if (!screen_priv->info) + return NULL; + ++ if (!screen_priv->info->get_crtc) ++ return NULL; ++ + return (*screen_priv->info->get_crtc)(window); + } + +@@ -196,6 +199,9 @@ present_flush(WindowPtr window) + if (!screen_priv->info) + return; + ++ if (!screen_priv->info->flush) ++ return; ++ + (*screen_priv->info->flush) (window); + } diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index 1f1fcfa..d117623 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -16,7 +16,7 @@ Name: xorg-x11-server Version: 1.20.11 -Release: 6 +Release: 7 Summary: X.Org X11 X server License: MIT and GPLv2 URL: https://www.x.org @@ -76,7 +76,10 @@ Patch0025: 0021-xwayland-Fix-emulated-modes-not-being-removed-when-s.patch Patch0026: 0022-xwayland-Call-xwl_window_check_resolution_change_emu.patch Patch0027: 0023-xwayland-Fix-setting-of-_XWAYLAND_RANDR_EMU_MONITOR_.patch Patch0028: 0024-xwayland-Remove-unnecessary-xwl_window_is_toplevel-c.patch - + +Patch0100: 0001-Fix-the-crash-in-shadowUpdatePacked-because-of-memcp.patch +Patch0101: 0002-present-Crash-in-present_scmd_get_crtc-and-present_flush.patch + Patch0029: xorg-s11-server-CVE-2018-20839.patch Patch6000: backport-CVE-2021-4008.patch Patch6001: backport-CVE-2021-4009.patch @@ -426,6 +429,10 @@ find %{inst_srcdir}/hw/xfree86 -name \*.c -delete %{_mandir}/man*/* %changelog +* Fri Jul 22 2022 ouyangminxiang - 1.20.11-7 +- Fix the crash in shadowUpdatePacked because of memcpy acts randomly with overlapping areas. +- Fix the problem of black screen after entering the login interface + * Fri Jun 24 2022 wangkerong - 1.20.11-6 - disable Xwayland provide by xorg-x11-server-Xwayland - delete the same files of common and help -- Gitee