From patchwork Thu Dec 7 17:37:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhesh Poyarekar X-Patchwork-Id: 1873336 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=kX3q2LX+; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SmM1W4H2nz23yf for ; Fri, 8 Dec 2023 04:38:07 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 78AAE3858C5E for ; Thu, 7 Dec 2023 17:38:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 78AAE3858C5E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1701970684; bh=R+mtBf+b2kehIQ1bHBbWHf+0FPRyQkc66bp37pcRj3M=; h=From:To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=kX3q2LX+eOfDjU3RyrYVPX5S2OOZY+S3Wjaqu3cKj39zy+IaMDAmRbksL8p8Z1gt3 6Ob77pyqEOb7tWu2KjWT11WSp+3EadvD7j1wnEp7AJpLTYeTD0w3Y8+NuffqgscLYB xF0Msf3YWLMZLpFzR6sRekyQlmFs/XFpTOYXT6P0= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from slateblue.cherry.relay.mailchannels.net (slateblue.cherry.relay.mailchannels.net [23.83.223.168]) by sourceware.org (Postfix) with ESMTPS id 05050385828C for ; Thu, 7 Dec 2023 17:37:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 05050385828C Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=sourceware.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=sourceware.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 05050385828C Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=23.83.223.168 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1701970670; cv=pass; b=A2tP1//uFVdpvs6SgfhR6jLBgjZHW67HmgjO4TJe3SttaV7BDK7PMIYTTIvqBw1uVbQUPA9i632i3TL/oGAULNcRG0aqKXkTddi5LBq22t5DOnJifdsAIjigV+AipzJi8P0cMGG7ghoO4SiKgv17PSkISxswvLS7ZRhWOz3NWS0= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1701970670; c=relaxed/simple; bh=N8rs7F8GNoBXZW7xYUEjrOrmv05+qJ/Ki9GVIdn4IbU=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=Xe51btn0jIhmzLYfF71T2wW3QvXczpQPkmgTjoprVwgaYb7PZgt2FI24PqlPYYGCd09lMC2rWUFSfB9sQ18rughZrRiCk5vAqhL+Qt+3WYaWbpbRz54I2xFGDUJ5dEg2EqNqv8UEY/TMP8mNCtcgdYde79kHbG9u09N0I/BU3mw= ARC-Authentication-Results: i=2; server2.sourceware.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 8671B362753; Thu, 7 Dec 2023 17:37:46 +0000 (UTC) Received: from pdx1-sub0-mail-a220.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 454EF3622A5; Thu, 7 Dec 2023 17:37:46 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1701970666; a=rsa-sha256; cv=none; b=WG/fK2r5og/nkjylr1oRwuhRo0aow4YPS7b2+qdtG7Qx8418KqCKTkx1pBRw03sqbIVp7W hzCV433ga1IgPFl2tvyrqZSWiJYHwGfRFaJKvqyEqCK37bJA6tVZHN+k6qfZSZlq5ZhzRN dhTVJVXY3Noykvc2RGcjt2RIMVmn4jqha+s4SK3OGCQLLmEEWr9AMmqpCp5Lfin52H27M+ L261IvIQKtTEy7dwMx1wW5zHavDrL8RfQtZv8xbLKetwiFyovIjbL+Pz441bu8H75lFmJN YOuCGDVPwWL+KeQIuxUBKMsiuL5tWHCyfqAbP9anq3HEPAzFn+r+OmxV6goRew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1701970666; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=R+mtBf+b2kehIQ1bHBbWHf+0FPRyQkc66bp37pcRj3M=; b=Nu3LY73OoYzP2nDIWjkeYfcEhPvyzEY058nYtdhMlgiO/HBHYJFdLU+ajkHV16jR6gLccx J83ARAAa5H9z/re+CMR7ui4VVUeFIvzL12pYqm45N6Ts+gGjKZ2oL41AO3iMWJWEFj/aCQ 20aLy01mbx0wyhzC/Xb9iwqLCihNKZbhUPPmNqMQ9js+Mkt2zJPvOCY7AKu3M0f+zqHo+i RiYeH1C91aSqLCG9OE86mRP+3ySHe4x58maxcU59mY+swy00ZiaVAXM7ZTghRCiSGl48I4 ClmU24LCqI6KN5JJQIQz4lGMUXtwUzDPPe6WFlUNsNy+0pkmJzK9LcvvGnBB9Q== ARC-Authentication-Results: i=1; rspamd-d88d8bd54-wj8w7; auth=pass smtp.auth=dreamhost smtp.mailfrom=siddhesh@sourceware.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Fearful-Squirrel: 0819f49c3646a3b0_1701970666436_1057308920 X-MC-Loop-Signature: 1701970666436:1245121015 X-MC-Ingress-Time: 1701970666436 Received: from pdx1-sub0-mail-a220.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.96.209.6 (trex/6.9.2); Thu, 07 Dec 2023 17:37:46 +0000 Received: from fedora.redhat.com (bras-vprn-toroon4834w-lp130-02-142-113-138-136.dsl.bell.ca [142.113.138.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a220.dreamhost.com (Postfix) with ESMTPSA id 4SmM156Pj1zCT; Thu, 7 Dec 2023 09:37:45 -0800 (PST) From: Siddhesh Poyarekar To: libc-alpha@sourceware.org Cc: fweimer@redhat.com Subject: [committed] Move CVE information into advisories directory Date: Thu, 7 Dec 2023 12:37:42 -0500 Message-ID: <20231207173742.245363-1-siddhesh@sourceware.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Spam-Status: No, score=-1172.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_LOTSOFHASH, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_SOFTFAIL, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org One of the requirements to becoming a CVE Numbering Authority (CNA) is to publish advisories. Do this by maintaining a file for each CVE fixed in the advisories directory in the source tree. Links to the advisories can then be shared as: https://sourceware.org/git/?p=glibc.git;a=blob_plain;f=advisories/GLIBC-SA-YYYY-NNNN The file format at the moment is rudimentary and derives from the git commit format, i.e. a subject line and a potentially multi-paragraph description and then tags to describe some meta information. This is a loose format at the moment and could change as we evolve this. Also add a script process-fixed-cves.sh that processes these advisories and generates a list to add to NEWS at release time. Signed-off-by: Siddhesh Poyarekar --- Changes from v2: - Used Florian's suggested tags to record commits, backports and releases. The only change I made to it was to use (2.39) instead of (pre-2.39) for the Fix-Commit tag, retaining pre- only for Vulnerable-Commit. This should technically only occur when there are multiple Vulnerable-Backport tags. - Adapted process-fixed-cves.sh to use this to generate CVE lists for NEWS. NEWS | 24 +++++--------------- advisories/GLIBC-SA-2023-0001 | 14 ++++++++++++ advisories/GLIBC-SA-2023-0002 | 15 +++++++++++++ advisories/GLIBC-SA-2023-0003 | 15 +++++++++++++ advisories/GLIBC-SA-2023-0004 | 16 ++++++++++++++ advisories/GLIBC-SA-2023-0005 | 20 +++++++++++++++++ scripts/process-fixed-cves.sh | 41 +++++++++++++++++++++++++++++++++++ 7 files changed, 126 insertions(+), 19 deletions(-) create mode 100644 advisories/GLIBC-SA-2023-0001 create mode 100644 advisories/GLIBC-SA-2023-0002 create mode 100644 advisories/GLIBC-SA-2023-0003 create mode 100644 advisories/GLIBC-SA-2023-0004 create mode 100644 advisories/GLIBC-SA-2023-0005 create mode 100755 scripts/process-fixed-cves.sh diff --git a/NEWS b/NEWS index 8c1c149f91..3f0dee4fcc 100644 --- a/NEWS +++ b/NEWS @@ -75,25 +75,11 @@ Changes to build and runtime requirements: Security related changes: - CVE-2023-4527: If the system is configured in no-aaaa mode via - /etc/resolv.conf, getaddrinfo is called for the AF_UNSPEC address - family, and a DNS response is received over TCP that is larger than - 2048 bytes, getaddrinfo may potentially disclose stack contents via - the returned address data, or crash. - - CVE-2023-4806: When an NSS plugin only implements the - _gethostbyname2_r and _getcanonname_r callbacks, getaddrinfo could use - memory that was freed during buffer resizing, potentially causing a - crash or read or write to arbitrary memory. - - CVE-2023-5156: The fix for CVE-2023-4806 introduced a memory leak when - an application calls getaddrinfo for AF_INET6 with AI_CANONNAME, - AI_ALL and AI_V4MAPPED flags set. - - CVE-2023-4911: If a tunable of the form NAME=NAME=VAL is passed in the - environment of a setuid program and NAME is valid, it may result in a - buffer overflow, which could be exploited to achieve escalated - privileges. This flaw was introduced in glibc 2.34. +The following CVEs were fixed in this release, details of which can be +found in the advisories directory of the release tarball: + + [The release manager will add the list generated by + scripts/process-fixed-cves.sh just before the release.] The following bugs are resolved with this release: diff --git a/advisories/GLIBC-SA-2023-0001 b/advisories/GLIBC-SA-2023-0001 new file mode 100644 index 0000000000..12b4f8edb8 --- /dev/null +++ b/advisories/GLIBC-SA-2023-0001 @@ -0,0 +1,14 @@ +printf: incorrect output for integers with thousands separator and width field + +When the printf family of functions is called with a format specifier +that uses an (enable grouping) and a minimum width +specifier, the resulting output could be larger than reasonably expected +by a caller that computed a tight bound on the buffer size. The +resulting larger than expected output could result in a buffer overflow +in the printf family of functions. + +CVE-Id: CVE-2023-25139 +Public-Date: 2023-02-02 +Vulnerable-Commit: e88b9f0e5cc50cab57a299dc7efe1a4eb385161d (2.37) +Fix-Commit: c980549cc6a1c03c23cc2fe3e7b0fe626a0364b0 (2.38) +Fix-Backport: 07b9521fc6369d000216b96562ff7c0ed32a16c4 (2.37) diff --git a/advisories/GLIBC-SA-2023-0002 b/advisories/GLIBC-SA-2023-0002 new file mode 100644 index 0000000000..32e45f524f --- /dev/null +++ b/advisories/GLIBC-SA-2023-0002 @@ -0,0 +1,15 @@ +getaddrinfo: Stack read overflow in no-aaaa mode + +If the system is configured in no-aaaa mode via /etc/resolv.conf, +getaddrinfo is called for the AF_UNSPEC address family, and a DNS +response is received over TCP that is larger than 2048 bytes, +getaddrinfo may potentially disclose stack contents via the returned +address data, or crash. + +CVE-Id: CVE-2023-4527 +Public-Date: 2023-09-12 +Vulnerable-Commit: f282cdbe7f436c75864e5640a409a10485e9abb2 (2.36) +Fix-Commit: bd77dd7e73e3530203be1c52c8a29d08270cb25d (2.39) +Fix-Backport: 4ea972b7edd7e36610e8cde18bf7a8149d7bac4f (2.36) +Fix-Backport: b7529346025a130fee483d42178b5c118da971bb (2.37) +Fix-Backport: b25508dd774b617f99419bdc3cf2ace4560cd2d6 (2.38) diff --git a/advisories/GLIBC-SA-2023-0003 b/advisories/GLIBC-SA-2023-0003 new file mode 100644 index 0000000000..0950dc0792 --- /dev/null +++ b/advisories/GLIBC-SA-2023-0003 @@ -0,0 +1,15 @@ +getaddrinfo: Potential use-after-free + +When an NSS plugin only implements the _gethostbyname2_r and +_getcanonname_r callbacks, getaddrinfo could use memory that was freed +during buffer resizing, potentially causing a crash or read or write to +arbitrary memory. + +CVE-Id: CVE-2023-4806 +Public-Date: 2023-09-12 +Fix-Commit: 973fe93a5675c42798b2161c6f29c01b0e243994 (2.39) +Fix-Backport: e09ee267c03e3150c2c9ba28625ab130705a485e (2.34) +Fix-Backport: e3ccb230a961b4797510e6a1f5f21fd9021853e7 (2.35) +Fix-Backport: a9728f798ec7f05454c95637ee6581afaa9b487d (2.36) +Fix-Backport: 6529a7466c935f36e9006b854d6f4e1d4876f942 (2.37) +Fix-Backport: 00ae4f10b504bc4564e9f22f00907093f1ab9338 (2.38) diff --git a/advisories/GLIBC-SA-2023-0004 b/advisories/GLIBC-SA-2023-0004 new file mode 100644 index 0000000000..cba13db38f --- /dev/null +++ b/advisories/GLIBC-SA-2023-0004 @@ -0,0 +1,16 @@ +tunables: local privilege escalation through buffer overflow + +If a tunable of the form NAME=NAME=VAL is passed in the environment of a +setuid program and NAME is valid, it may result in a buffer overflow, +which could be exploited to achieve escalated privileges. This flaw was +introduced in glibc 2.34. + +CVE-Id: CVE-2023-4911 +Public-Date: 2023-10-03 +Vulnerable-Commit: 2ed18c5b534d9e92fc006202a5af0df6b72e7aca (2.34) +Fix-Commit: 1056e5b4c3f2d90ed2b4a55f96add28da2f4c8fa (2.39) +Fix-Backport: dcc367f148bc92e7f3778a125f7a416b093964d9 (2.34) +Fix-Backport: c84018a05aec80f5ee6f682db0da1130b0196aef (2.35) +Fix-Backport: 22955ad85186ee05834e47e665056148ca07699c (2.36) +Fix-Backport: b4e23c75aea756b4bddc4abcf27a1c6dca8b6bd3 (2.37) +Fix-Backport: 750a45a783906a19591fb8ff6b7841470f1f5701 (2.38) diff --git a/advisories/GLIBC-SA-2023-0005 b/advisories/GLIBC-SA-2023-0005 new file mode 100644 index 0000000000..a518af803a --- /dev/null +++ b/advisories/GLIBC-SA-2023-0005 @@ -0,0 +1,20 @@ +getaddrinfo: DoS due to memory leak + +The fix for CVE-2023-4806 introduced a memory leak when an application +calls getaddrinfo for AF_INET6 with AI_CANONNAME, AI_ALL and AI_V4MAPPED +flags set. + +CVE-Id: CVE-2023-5156 +Public-Date: 2023-09-25 +Vulnerable-Commit: 973fe93a5675c42798b2161c6f29c01b0e243994 (pre-2.39) +Fix-Commit: ec6b95c3303c700eb89eebeda2d7264cc184a796 (2.39) +Vulnerable-Backport: e09ee267c03e3150c2c9ba28625ab130705a485e (2.34) +Vulnerable-Backport: e3ccb230a961b4797510e6a1f5f21fd9021853e7 (2.35) +Vulnerable-Backport: a9728f798ec7f05454c95637ee6581afaa9b487d (2.36) +Vulnerable-Backport: 6529a7466c935f36e9006b854d6f4e1d4876f942 (2.37) +Vulnerable-Backport: 00ae4f10b504bc4564e9f22f00907093f1ab9338 (2.38) +Fix-Backport: 8006457ab7e1cd556b919f477348a96fe88f2e49 (2.34) +Fix-Backport: 17092c0311f954e6f3c010f73ce3a78c24ac279a (2.35) +Fix-Backport: 856bac55f98dc840e7c27cfa82262b933385de90 (2.36) +Fix-Backport: 4473d1b87d04b25cdd0e0354814eeaa421328268 (2.37) +Fix-Backport: 5ee59ca371b99984232d7584fe2b1a758b4421d3 (2.38) diff --git a/scripts/process-fixed-cves.sh b/scripts/process-fixed-cves.sh new file mode 100755 index 0000000000..7a870f57ae --- /dev/null +++ b/scripts/process-fixed-cves.sh @@ -0,0 +1,41 @@ +#!/bin/bash -e +# Copyright The GNU Toolchain Authors. +# This file is part of the GNU C Library. +# +# The GNU C Library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# The GNU C Library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with the GNU C Library; if not, see +# . + +if ! [ -d advisories ]; then + echo "error: Run me from the toplevel directory of the glibc repository." + exit 1 +fi + +release=$(echo RELEASE | gcc -E -include version.h -o - - | grep -v "^#") +minor=$(echo __GLIBC_MINOR__ | gcc -E -include include/features.h -o - - | + grep -v "^#") + +if [ $release = "\"development\"" ]; then + cur_rel=2.$((minor + 1)) +else + cur_rel=2.$minor +fi + +for f in $(grep -l "^Fix-Commit: .* ($cur_rel)$" advisories/*); do + echo -e " $(basename $f):" + cve_id=$(sed -n 's/CVE-Id: \(.*\)/\1/p' $f) + echo "$(head -1 $f) ($cve_id)" | fold -w 68 -s | while read line; do + echo " $line" + done + echo +done