From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id AL+nDIePhGDPgAAAgWs5BA (envelope-from ) for ; Sat, 24 Apr 2021 23:37:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id APYkCIePhGC+YgAAbx9fmQ (envelope-from ) for ; Sat, 24 Apr 2021 21:37:11 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 706758DBF for ; Sat, 24 Apr 2021 23:37:10 +0200 (CEST) Received: from localhost ([::1]:52828 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1laPxd-0000Nl-8y for larch@yhetil.org; Sat, 24 Apr 2021 17:37:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47664) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1laPxW-0000Nc-O4 for guix-patches@gnu.org; Sat, 24 Apr 2021 17:37:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58309) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1laPxW-00078J-Gm for guix-patches@gnu.org; Sat, 24 Apr 2021 17:37:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1laPxW-0000Fj-EH for guix-patches@gnu.org; Sat, 24 Apr 2021 17:37:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48001] [PATCH] gnu: xorg-server: CVE-2021-3472. References: In-Reply-To: Resent-From: Leo Famulari Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 24 Apr 2021 21:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48001 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48001@debbugs.gnu.org Received: via spool by 48001-submit@debbugs.gnu.org id=B48001.1619300213956 (code B ref 48001); Sat, 24 Apr 2021 21:37:02 +0000 Received: (at 48001) by debbugs.gnu.org; 24 Apr 2021 21:36:53 +0000 Received: from localhost ([127.0.0.1]:41622 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1laPxF-0000FD-IN for submit@debbugs.gnu.org; Sat, 24 Apr 2021 17:36:53 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:38261) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1laPxC-0000Ew-3e for 48001@debbugs.gnu.org; Sat, 24 Apr 2021 17:36:44 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 05E535C008C; Sat, 24 Apr 2021 17:36:36 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Sat, 24 Apr 2021 17:36:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=date:from:to:subject:message-id:mime-version:content-type; s= mesmtp; bh=XWOYuSkWOfXe41tk4j82ROePxvSi2SBw1DY4Ouvl7EE=; b=Hmz7S CZA8+1WhW5sJDBtlq/j6EqFQ//HJmw1ady+5EHT9MQzfmIgxEB8nTfd4T65AqRn9 l83a7uHtxp2ZTBXSaH438pWn7FxLoVr/PpRSDEsrXv4BZt70+n6/YGLBqAZ9Psgl TVccJdZPPMtoKNfAy7YgV/53cwXLfXnWgZCHeQ= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; bh=XWOYuSkWOfXe41tk4j82ROePxvSi2 SBw1DY4Ouvl7EE=; b=YEHrQXhDaQ3DhX5vnI06Q4iuGD8wJq5tk/FcsEJUZoj4W dwoVwfUv2+boGq664GRL3HdLaCV9TQDTE0QE8lDBGDggijm8fZMK2q09aWztQKhH n5SznX4xUvZwEH0YEp0nuiX0ZmgcRvXTROSRsqkSXfG7b2FL+of5C0783e7RKVDp EkfXYP3XoXZQj00WG7WFS3bretD+mqNKNvnnsfrTPJdZuZh3qepa5HfIL3xV4PjL ZhqrfVE+O3iVYrFvcF+h6d56rizL9cPT2NeDYaw9elPlDm/YBWaLv44arIKt4luZ io+iaqIIe6UtKmsDo8OWDmexhB+609070myPN3cDg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvddugedgudeigecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfggtggusehgtdorre dttddvnecuhfhrohhmpefnvghoucfhrghmuhhlrghrihcuoehlvghosehfrghmuhhlrghr ihdrnhgrmhgvqeenucggtffrrghtthgvrhhnpeejkeejgfdtffegvddthfehjeelvdelhf euieetvedvjeffleegvdefffdvveegkeenucfkphepuddttddruddurdduieelrdduudek necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheplhgvoh esfhgrmhhulhgrrhhirdhnrghmvg X-ME-Proxy: Received: from localhost (pool-100-11-169-118.phlapa.fios.verizon.net [100.11.169.118]) by mail.messagingengine.com (Postfix) with ESMTPA id 82CEC240054 for <48001@debbugs.gnu.org>; Sat, 24 Apr 2021 17:36:35 -0400 (EDT) Date: Sat, 24 Apr 2021 17:36:30 -0400 From: Leo Famulari Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="mm3URnLuC/e5LolR" Content-Disposition: inline X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1619300230; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=XWOYuSkWOfXe41tk4j82ROePxvSi2SBw1DY4Ouvl7EE=; b=T/rFzS24D7sMGuqJPqKELD3joD6pTb9u4ZDLCIIzrRT1OyjGy3rI1PiozvZkxy8RDSpUX1 Q2O9iPUH3Iw6LnP5eaohbh7qZEw3wV8iWHuHLQ8hLlTCQvAD/Mv4GgrVnjw6ShcWNpSxc2 J+ml26P9TFX74GWBPxIdfDRRNe8DbJi/qI0/NDFePsO6LmECf18KiPx1YBzdVSczAUYfVz 7Uvd/MsBwJTNBALoWwCoYDA5Z31RNpbFJAmfviV0tuddomsCgD0f7EC74xbH6v1mg1Vp0M CWwdL8rbNPDaecupELhAfXeTNgYxRb09W6SPbNMBkNbWfdF0dOre8aTVBNI3Og== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1619300230; a=rsa-sha256; cv=none; b=bgTBVnZnihrWL9FKCk5dYEAwPmEQQvfg5nr16Tw06KonQRDzofcMLleZ23vgWAOV8o/yyd uU2sKPWLnkHlyqNAG+yQKnv+6wqCH+poS/24BoAcggG1Z1Anx3PuPhAwCEs2aG9zusqKGs b9j65DjW+O7uEXx1zUiC1BN+fvNMvQSj0q2XLvZeg5BgrHvJyqvIT2UX+mOQc3kJr8op3I aKnsDjkJMPZS+kDV3z7tXr7ybJq2j9Ogden46OWVhiXvhBGbhBGZHU6iiO9ir2IWZIHWTs Fz2GpuQCEOGjPekS6kpfkttCzEuxRaAyYSG7kPkMKfIJzCUoxCxKPuDDQMrjUQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=famulari.name header.s=mesmtp header.b="Hmz7S CZ"; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm2 header.b=YEHrQXhD; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -3.54 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=famulari.name header.s=mesmtp header.b="Hmz7S CZ"; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm2 header.b=YEHrQXhD; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 706758DBF X-Spam-Score: -3.54 X-Migadu-Scanner: scn0.migadu.com X-TUID: UApmd9McFr5U --mm3URnLuC/e5LolR Content-Type: multipart/mixed; boundary="SW0aTBK9UaEsqe/L" Content-Disposition: inline --SW0aTBK9UaEsqe/L Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable The first revision of this patch does not take care to avoid changing the derivation of xorg-server-for-tests, so it would cause way too many packages to be rebuilt. Here is a revised patch that ensures the derivation remains the same. For example: ------ $ guix build -e '(@@ (gnu packages xorg) xorg-server-for-tests)' --no-graft= s -d =20 /gnu/store/nhs1c9q04g6k4prxxv4kb9q5lg1p872q-xorg-server-1.20.10.drv $ ./pre-inst-env guix build -e '(@@ (gnu packages xorg) xorg-server-for-tes= ts)' --no-grafts -d /gnu/store/nhs1c9q04g6k4prxxv4kb9q5lg1p872q-xorg-server-1.20.10.drv ------ --SW0aTBK9UaEsqe/L Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-gnu-xorg-server-CVE-2021-3472.patch" Content-Transfer-Encoding: quoted-printable =46rom cc4b92215511eb4cd0853438194004159964cbd4 Mon Sep 17 00:00:00 2001 =46rom: Leo Famulari Date: Sat, 24 Apr 2021 15:34:24 -0400 Subject: [PATCH] gnu: xorg-server: CVE-2021-3472. * gnu/packages/patches/xorg-server-CVE-2021-3472.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/xorg.scm (xorg-server)[source]: Use it. [xorg-server-for-tests]: Do not use it, to avoid changing the derivation of= this package. --- gnu/local.mk | 1 + .../patches/xorg-server-CVE-2021-3472.patch | 44 +++++++++++++++++++ gnu/packages/xorg.scm | 31 +++++++++++-- 3 files changed, 73 insertions(+), 3 deletions(-) create mode 100644 gnu/packages/patches/xorg-server-CVE-2021-3472.patch diff --git a/gnu/local.mk b/gnu/local.mk index 50b11a8ca2..3d076de924 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1815,6 +1815,7 @@ dist_patch_DATA =3D \ %D%/packages/patches/xfce4-panel-plugins.patch \ %D%/packages/patches/xfce4-settings-defaults.patch \ %D%/packages/patches/xmonad-dynamic-linking.patch \ + %D%/packages/patches/xorg-server-CVE-2021-3472.patch \ %D%/packages/patches/xplanet-1.3.1-cxx11-eof.patch \ %D%/packages/patches/xplanet-1.3.1-libdisplay_DisplayOutput.cpp.patch \ %D%/packages/patches/xplanet-1.3.1-libimage_gif.c.patch \ diff --git a/gnu/packages/patches/xorg-server-CVE-2021-3472.patch b/gnu/pac= kages/patches/xorg-server-CVE-2021-3472.patch new file mode 100644 index 0000000000..523a5b1dbf --- /dev/null +++ b/gnu/packages/patches/xorg-server-CVE-2021-3472.patch @@ -0,0 +1,44 @@ +Fix CVE-2021-3472: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=3DCVE-2021-3472 +https://seclists.org/oss-sec/2021/q2/20 + +Patch copied from upstream source repository: + +https://gitlab.freedesktop.org/xorg/xserver/-/commit/7aaf54a1884f71dc363f0= b884e57bcb67407a6cd + +From 7aaf54a1884f71dc363f0b884e57bcb67407a6cd Mon Sep 17 00:00:00 2001 +From: Matthieu Herrb +Date: Sun, 21 Mar 2021 18:38:57 +0100 +Subject: [PATCH] Fix XChangeFeedbackControl() request underflow + +CVE-2021-3472 / ZDI-CAN-1259 + +This vulnerability was discovered by: +Jan-Niklas Sohn working with Trend Micro Zero Day Initiative + +Signed-off-by: Matthieu Herrb +--- + Xi/chgfctl.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/Xi/chgfctl.c b/Xi/chgfctl.c +index 1de4da9ef..7a597e43d 100644 +--- a/Xi/chgfctl.c ++++ b/Xi/chgfctl.c +@@ -464,8 +464,11 @@ ProcXChangeFeedbackControl(ClientPtr client) + break; + case StringFeedbackClass: + { +- xStringFeedbackCtl *f =3D ((xStringFeedbackCtl *) &stuff[1]); ++ xStringFeedbackCtl *f; +=20 ++ REQUEST_AT_LEAST_EXTRA_SIZE(xChangeFeedbackControlReq, ++ sizeof(xStringFeedbackCtl)); ++ f =3D ((xStringFeedbackCtl *) &stuff[1]); + if (client->swapped) { + if (len < bytes_to_int32(sizeof(xStringFeedbackCtl))) + return BadLength; +--=20 +2.31.1 + diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm index 97ff8ab92b..941958aa7a 100644 --- a/gnu/packages/xorg.scm +++ b/gnu/packages/xorg.scm @@ -5312,7 +5312,7 @@ over Xlib, including: (base32 "16bwrf0ag41l7jbrllbix8z6avc5yimga7ihvq4ch3a5hb020x4p")) (patches - (list + (cons ;; See: ;; https://lists.fedoraproject.org/archives/list/devel@lists. ;; fedoraproject.org/message/JU655YB7AM4OOEQ4MOMCRHJTYJ76VF= OK/ @@ -5324,7 +5324,8 @@ over Xlib, including: (sha256 (base32 "0mm70y058r8s9y9jiv7q2myv0ycnaw3iqzm7d274410s0ik38w7q")) - (file-name "xorg-server-use-intel-only-on-pre-gen4.diff")))))) + (file-name "xorg-server-use-intel-only-on-pre-gen4.diff")) + (search-patches "xorg-server-CVE-2021-3472.patch"))))) (build-system gnu-build-system) (propagated-inputs `(("libpciaccess" ,libpciaccess) @@ -5432,7 +5433,31 @@ draggable titlebars and borders.") (define-public xorg-server-for-tests (hidden-package (package - (inherit xorg-server)))) + (inherit xorg-server) + (version "1.20.10") + ;; Don't apply xorg-server-CVE-2021-3472.patch + (source + (origin + (method url-fetch) + (uri (string-append "mirror://xorg/individual/xserver/" + "xorg-server-" version ".tar.bz2")) + (sha256 + (base32 + "16bwrf0ag41l7jbrllbix8z6avc5yimga7ihvq4ch3a5hb020x4p")) + (patches + (list + ;; See: + ;; https://lists.fedoraproject.org/archives/list/devel@lists. + ;; fedoraproject.org/message/JU655YB7AM4OOEQ4MOMCRHJTYJ76V= FOK/ + (origin + (method url-fetch) + (uri (string-append + "http://pkgs.fedoraproject.org/cgit/rpms/xorg-x11-serve= r.git" + "/plain/06_use-intel-only-on-pre-gen4.diff")) + (sha256 + (base32 + "0mm70y058r8s9y9jiv7q2myv0ycnaw3iqzm7d274410s0ik38w7q")) + (file-name "xorg-server-use-intel-only-on-pre-gen4.diff")))))= )))) =20 (define-public xorg-server-xwayland (package/inherit xorg-server --=20 2.31.1 --SW0aTBK9UaEsqe/L-- --mm3URnLuC/e5LolR Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAmCEj14ACgkQJkb6MLrK fwgdUg//cdMjEAoBDKyDpXX31YsG5xYVw0L0Wy91LyiGDMeBVuueqvfig7qYrZEF u3/BwjYSbGIxrAG2NhEvQacqj6LpttIkp205isxMaMLvz/Jm9l8TixN5iBuckPIz xuAKR5tzjL2YhQLLMCGM7jUlg7ffhFoPoXQ3sQ64pGAzUfRZO8lA8mP21PBA69YZ 2zObd8+uOE2osyJ9lt5sVaM9LPvhWaPIx1WRwhwy3TwuxEm5Y/U9jbJqJZk/mrMC VS7efAnm8lO6DLu6GYfstzQOgKalDwOrK6ks9Hlahp4RUhuu9vL1x3XEhQ9PDHJJ iYE0fueKgbALp2m0gVnLlJ+AaozUFa4v0nMtXscLLxsSRIYby7uDxWvMUJeCObEF yBeMU3X3GNRmYBmyxRBeeepAI7L39BxsX7k0wraExIFpag7Km27SdemJJP8A/d0y jQgW0Ru0o1pZAkI8mDL93q423um/GVcEeqbHPRKddkGMYm/zYKhoQfyXNAC7MUr+ pUzWfA4NKQFDb6jZIqySYTQwLO2LP0tfYbEcllgi44VsE5qXUwMmsSuD5ItVv2iy 9pdOCzEDUU/qk7NHopPz0s7n5qT5y2qZORCPkRUqJDPnj7tv0aEZpxS7BdrxBMn8 UZW8edx7RZLuSydfsKRjGY6WXG/KsU6I2AZiprkBFfezDtQtyZ8= =+JTq -----END PGP SIGNATURE----- --mm3URnLuC/e5LolR--