Fixed a crash when the shadowUpdatePacked function and the Nvidia driver function were called

This commit is contained in:
ouyanglearnning 2022-07-22 10:47:16 +08:00
parent 9987d8b518
commit 3b299aef87
3 changed files with 59 additions and 2 deletions

View File

@ -0,0 +1,26 @@
From de7b67924425b3aa540c19c8431ff0d7c5892608 Mon Sep 17 00:00:00 2001
From: rpm-build <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 <tangjie02@kylinsec.com.cn>
---
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

View File

@ -0,0 +1,24 @@
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);
}

View File

@ -16,7 +16,7 @@
Name: xorg-x11-server Name: xorg-x11-server
Version: 1.20.11 Version: 1.20.11
Release: 6 Release: 7
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
@ -77,6 +77,9 @@ Patch0026: 0022-xwayland-Call-xwl_window_check_resolution_change_emu.patch
Patch0027: 0023-xwayland-Fix-setting-of-_XWAYLAND_RANDR_EMU_MONITOR_.patch Patch0027: 0023-xwayland-Fix-setting-of-_XWAYLAND_RANDR_EMU_MONITOR_.patch
Patch0028: 0024-xwayland-Remove-unnecessary-xwl_window_is_toplevel-c.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 Patch0029: xorg-s11-server-CVE-2018-20839.patch
Patch6000: backport-CVE-2021-4008.patch Patch6000: backport-CVE-2021-4008.patch
Patch6001: backport-CVE-2021-4009.patch Patch6001: backport-CVE-2021-4009.patch
@ -426,6 +429,10 @@ find %{inst_srcdir}/hw/xfree86 -name \*.c -delete
%{_mandir}/man*/* %{_mandir}/man*/*
%changelog %changelog
* Fri Jul 22 2022 ouyangminxiang<ouyangminxiang@kylinsec.com.cn> - 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<wangkerong@h-partners.com> - 1.20.11-6 * Fri Jun 24 2022 wangkerong<wangkerong@h-partners.com> - 1.20.11-6
- disable Xwayland provide by xorg-x11-server-Xwayland - disable Xwayland provide by xorg-x11-server-Xwayland
- delete the same files of common and help - delete the same files of common and help