From patchwork Sat Apr 24 19:38:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Famulari X-Patchwork-Id: 28856 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id EFBAC27BC7D; Sat, 24 Apr 2021 20:40:15 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 549DF27BC7C for ; Sat, 24 Apr 2021 20:40:11 +0100 (BST) Received: from localhost ([::1]:57432 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1laO8Q-0000Qy-Fh for patchwork@mira.cbaines.net; Sat, 24 Apr 2021 15:40:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59434) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1laO8I-0000Qf-Fp for guix-patches@gnu.org; Sat, 24 Apr 2021 15:40:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58225) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1laO8I-0001dO-7p for guix-patches@gnu.org; Sat, 24 Apr 2021 15:40:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1laO8I-0005tD-48 for guix-patches@gnu.org; Sat, 24 Apr 2021 15:40:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48001] [PATCH] gnu: xorg-server: CVE-2021-3472. Resent-From: Leo Famulari Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 24 Apr 2021 19:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 48001 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48001@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.161929316122582 (code B ref -1); Sat, 24 Apr 2021 19:40:02 +0000 Received: (at submit) by debbugs.gnu.org; 24 Apr 2021 19:39:21 +0000 Received: from localhost ([127.0.0.1]:41538 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1laO7V-0005s2-Sm for submit@debbugs.gnu.org; Sat, 24 Apr 2021 15:39:21 -0400 Received: from lists.gnu.org ([209.51.188.17]:59042) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1laO7R-0005rs-QU for submit@debbugs.gnu.org; Sat, 24 Apr 2021 15:39:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59326) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1laO7R-0000OW-I5 for guix-patches@gnu.org; Sat, 24 Apr 2021 15:39:09 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:59841) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1laO7P-00011d-A8 for guix-patches@gnu.org; Sat, 24 Apr 2021 15:39:09 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 910EA5C007E; Sat, 24 Apr 2021 15:39:05 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Sat, 24 Apr 2021 15:39:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; s=mesmtp; bh=0hbgAzY7RA0V8kmojY1b7C6 DX0MiHBuv4ptZdVEHQZk=; b=ke1VxbIansmz2Zrv80Cc71K7HMuQECPef6otb2p UyN+20ZUtVbEpAESahtekSmbYAqczgRvm2qwbsqHA+f/ZW2DIrly2elPlv/l/aYv n8mzZkZxfm4MBLgDV0xpfeR4wsa/DXqwNS0lKW5RGBoXo5truBB71q6TgmJS3H7S ZyP4= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding: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=0hbgAzY7RA0V8kmoj Y1b7C6DX0MiHBuv4ptZdVEHQZk=; b=lJ0OHEzFNtrAiOV2/J8k43Kryzm7+tHEW W56GpztzN/9V/6bX420n3MK1BDVn9Br2/6jsHMwGBqMHgS78oYDhbP9K3JzRGAN0 vK9W7lq9DTEk9QdNy0u6xhaI/vliU3+S0RC7w5KyPVcKCdS9zrJW6Xs6JEEhvFDW TBJbWLnQXOvnvcJKI20V4rxGd1sG5hveqTjnTeGA5AcAj+jhgeMHZ0lZHAB+iWZR Odx76Ab6pkA73e6+Au/DZJyzfiWOerM4wQ5cjqBMqOhoa5cajikKQUuVUPssgGiq mnGL/xRCM0mtUB79L1EGXgl86K9RfQ3E98l6Npg2MuM1ah8bBV+0Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvddugedgudegtdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffoggfgsedtkeertd ertddtnecuhfhrohhmpefnvghoucfhrghmuhhlrghrihcuoehlvghosehfrghmuhhlrghr ihdrnhgrmhgvqeenucggtffrrghtthgvrhhnpeekvdelffelteekledutdejueffgedvue ffjeeiveejudfhtedtgfelgeffgfduhfenucffohhmrghinhepmhhithhrvgdrohhrghdp shgvtghlihhsthhsrdhorhhgpdhfrhgvvgguvghskhhtohhprdhorhhgpdhfvgguohhrrg hprhhojhgvtghtrdhorhhgnecukfhppedutddtrdduuddrudeiledruddukeenucevlhhu shhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlvghosehfrghmuh hlrghrihdrnhgrmhgv X-ME-Proxy: Received: from jasmine.lan (pool-100-11-169-118.phlapa.fios.verizon.net [100.11.169.118]) by mail.messagingengine.com (Postfix) with ESMTPA id 2965824005C for ; Sat, 24 Apr 2021 15:39:05 -0400 (EDT) From: Leo Famulari Date: Sat, 24 Apr 2021 15:38:58 -0400 Message-Id: X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Received-SPF: pass client-ip=66.111.4.26; envelope-from=leo@famulari.name; helo=out2-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * 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. --- gnu/local.mk | 1 + .../patches/xorg-server-CVE-2021-3472.patch | 44 +++++++++++++++++++ gnu/packages/xorg.scm | 5 ++- 3 files changed, 48 insertions(+), 2 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 = \ %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/packages/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=CVE-2021-3472 +https://seclists.org/oss-sec/2021/q2/20 + +Patch copied from upstream source repository: + +https://gitlab.freedesktop.org/xorg/xserver/-/commit/7aaf54a1884f71dc363f0b884e57bcb67407a6cd + +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 = ((xStringFeedbackCtl *) &stuff[1]); ++ xStringFeedbackCtl *f; + ++ REQUEST_AT_LEAST_EXTRA_SIZE(xChangeFeedbackControlReq, ++ sizeof(xStringFeedbackCtl)); ++ f = ((xStringFeedbackCtl *) &stuff[1]); + if (client->swapped) { + if (len < bytes_to_int32(sizeof(xStringFeedbackCtl))) + return BadLength; +-- +2.31.1 + diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm index 97ff8ab92b..df0055c704 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/JU655YB7AM4OOEQ4MOMCRHJTYJ76VFOK/ @@ -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)