From f0ee76772985acb343a32b685ae652647aa00b1e Mon Sep 17 00:00:00 2001 From: zhouwenpei Date: Tue, 10 Jan 2023 09:20:37 +0000 Subject: [PATCH] add missing patches --- ...atch => backport-0001-CVE-2022-46340.patch | 0 backport-0002-CVE-2022-46340.patch | 34 +++++++++++++++ ...perty-changes-if-verification-failed.patch | 41 +++++++++++++++++++ xorg-x11-server.spec | 15 ++++--- 4 files changed, 85 insertions(+), 5 deletions(-) rename backport-CVE-2022-46340.patch => backport-0001-CVE-2022-46340.patch (100%) create mode 100644 backport-0002-CVE-2022-46340.patch create mode 100644 backport-Xi-return-an-error-from-XI-property-changes-if-verification-failed.patch diff --git a/backport-CVE-2022-46340.patch b/backport-0001-CVE-2022-46340.patch similarity index 100% rename from backport-CVE-2022-46340.patch rename to backport-0001-CVE-2022-46340.patch diff --git a/backport-0002-CVE-2022-46340.patch b/backport-0002-CVE-2022-46340.patch new file mode 100644 index 0000000..b227688 --- /dev/null +++ b/backport-0002-CVE-2022-46340.patch @@ -0,0 +1,34 @@ +From bb1711b7fba42f2a0c7d1c09beee241a1b2bcc30 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Mon, 19 Dec 2022 10:06:45 +1000 +Subject: [PATCH] Xext: fix invalid event type mask in XTestSwapFakeInput + +In commit b320ca0 the mask was inadvertently changed from octal 0177 to +hexadecimal 0x177. + +Fixes commit b320ca0ffe4c0c872eeb3a93d9bde21f765c7c63 + Xtest: disallow GenericEvents in XTestSwapFakeInput + +Found by Stuart Cassoff + +Signed-off-by: Peter Hutterer +--- + Xext/xtest.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Xext/xtest.c b/Xext/xtest.c +index 2985a4ce6..dde5c4cf9 100644 +--- a/Xext/xtest.c ++++ b/Xext/xtest.c +@@ -502,7 +502,7 @@ XTestSwapFakeInput(ClientPtr client, xReq * req) + + nev = ((req->length << 2) - sizeof(xReq)) / sizeof(xEvent); + for (ev = (xEvent *) &req[1]; --nev >= 0; ev++) { +- int evtype = ev->u.u.type & 0x177; ++ int evtype = ev->u.u.type & 0177; + /* Swap event */ + proc = EventSwapVector[evtype]; + /* no swapping proc; invalid event type? */ +-- +GitLab + diff --git a/backport-Xi-return-an-error-from-XI-property-changes-if-verification-failed.patch b/backport-Xi-return-an-error-from-XI-property-changes-if-verification-failed.patch new file mode 100644 index 0000000..e4f203a --- /dev/null +++ b/backport-Xi-return-an-error-from-XI-property-changes-if-verification-failed.patch @@ -0,0 +1,41 @@ +From b8a84cb0f2807b07ab70ca9915fcdee21301b8ca Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Tue, 29 Nov 2022 13:24:00 +1000 +Subject: [PATCH] Xi: return an error from XI property changes if verification + failed + +Both ProcXChangeDeviceProperty and ProcXIChangeProperty checked the +property for validity but didn't actually return the potential error. + +Signed-off-by: Peter Hutterer +Acked-by: Olivier Fourdan +--- + Xi/xiproperty.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c +index a36f7d61d..68c362c62 100644 +--- a/Xi/xiproperty.c ++++ b/Xi/xiproperty.c +@@ -902,6 +902,8 @@ ProcXChangeDeviceProperty(ClientPtr client) + + rc = check_change_property(client, stuff->property, stuff->type, + stuff->format, stuff->mode, stuff->nUnits); ++ if (rc != Success) ++ return rc; + + len = stuff->nUnits; + if (len > (bytes_to_int32(0xffffffff - sizeof(xChangeDevicePropertyReq)))) +@@ -1141,6 +1143,9 @@ ProcXIChangeProperty(ClientPtr client) + + rc = check_change_property(client, stuff->property, stuff->type, + stuff->format, stuff->mode, stuff->num_items); ++ if (rc != Success) ++ return rc; ++ + len = stuff->num_items; + if (len > bytes_to_int32(0xffffffff - sizeof(xXIChangePropertyReq))) + return BadLength; +-- +GitLab + diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index 1555020..aabdd12 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -16,7 +16,7 @@ Name: xorg-x11-server Version: 1.20.8 -Release: 15 +Release: 16 Summary: X.Org X11 X server License: MIT and GPLv2 URL: https://www.x.org @@ -95,12 +95,14 @@ Patch6005: backport-0002-CVE-2022-2319.patch Patch6006: backport-CVE-2022-2320.patch Patch6007: backport-CVE-2022-3551.patch Patch6008: backport-CVE-2022-3553.patch -Patch6009: backport-CVE-2022-4283.patch -Patch6010: backport-CVE-2022-46340.patch +Patch6009: backport-0001-CVE-2022-46340.patch +Patch6010: backport-0002-CVE-2022-46340.patch Patch6011: backport-CVE-2022-46341.patch Patch6012: backport-CVE-2022-46342.patch Patch6013: backport-CVE-2022-46343.patch -Patch6014: backport-CVE-2022-46344.patch +Patch6014: backport-Xi-return-an-error-from-XI-property-changes-if-verification-failed.patch +Patch6015: backport-CVE-2022-46344.patch +Patch6016: backport-CVE-2022-4283.patch BuildRequires: audit-libs-devel autoconf automake bison dbus-devel flex flex-devel git gcc BuildRequires: systemtap-sdt-devel libtool pkgconfig @@ -343,7 +345,10 @@ find %{inst_srcdir}/hw/xfree86 -name \*.c -delete %{_libdir}/xorg/protocol.txt %changelog -* Thu Jan 05 2023 zhouwenpei - 1.20.8-14 +* Tue Jan 10 2023 zhouwenpei -1.20.8-16 +- add missing patches + +* Thu Jan 05 2023 zhouwenpei - 1.20.8-15 - Fix openEuler hard code problem - use -git instead of .git as the filename, to avoid .git ignore - Fix changelog date