From patchwork Thu Nov 30 13:11:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhesh Poyarekar X-Patchwork-Id: 81030 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C3D923857B9E for ; Thu, 30 Nov 2023 13:12:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C3D923857B9E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1701349962; bh=CU9B89oku+kPoMEPdnWUEn8tLk2hLvVv8p7WT57rgTM=; h=From:To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=NEjVhojZL4PWsGYpVSdKtkBQ9OvxauAkuWilzIYDkLkLDCKsSm94oC70FzHn2XpK1 UsJ1+6/th2QkvitRrEZkxM/DdNDtFiaFDNOKXfK4HiQgiYRdgeAdWiHbNSteMT7XL3 u8XMI8IaMhwLo3ZpqoVmpBBThQZ5oluWQ+sdUkyw= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from iguana.tulip.relay.mailchannels.net (iguana.tulip.relay.mailchannels.net [23.83.218.253]) by sourceware.org (Postfix) with ESMTPS id E924A3857341 for ; Thu, 30 Nov 2023 13:11:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E924A3857341 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 E924A3857341 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=23.83.218.253 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1701349922; cv=pass; b=lMRIyw8FVZbl8z2kRplXvD5AUX1XMR3KgrCV47aSrGKIER9ZLcFDf1mRzFDoLhWzCXaVoZWwt7e303JNobxvwIx/2LAK5q9YEMmDV0OrssoxSUHJsWd/zlEe4ZPH1HweX5f1wyAMLFWhO5c6DqhCkijdY99bpBTS9Qh/DOB9CYU= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1701349922; c=relaxed/simple; bh=eOL7m++6ouUFycx2lcQA+K3M4wjVYXf814uefIPVfio=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=k6XaEoJ4THx9USdi74ZhN5zdVRoEMmPxc/FB5Hoetgz/nXSMsnKxQsyJlNKEUY6ZIcW6vRbwovanUEMIRKK92TjpYCkQxFYOFo13buAI+MoaayttTIDsge3NX8uQMOmHzLeMN9I2r636i1c0FI1sPnavTQhgP8Qs8UqmzXoPJSA= 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 0BC314379A; Thu, 30 Nov 2023 13:11:59 +0000 (UTC) Received: from pdx1-sub0-mail-a301.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id B8DA043657; Thu, 30 Nov 2023 13:11:58 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1701349918; a=rsa-sha256; cv=none; b=g/kTB03sKWQ9eJ7PT3W7as+0WsK1x9UQ2HIEKSqlBcaNrI/0vV7tWDm74XQj2Q/XOhIXbs uNAshk8b772T/eUXWdQeL7UQqU/00cyenHaAHOC/7ViBoVcgJC56s+NnvNN3Wz/bMcWZQd J4F5yPGzpP6S4hAMSFG9g+P4hlQ/Roa3elBJRADCAH6AWJVTXE7UZ6rzPWkTeZMJ7atR/I owuJMT/P4H4hI1pe93YIID3hWTEIKHdKg5WFeIGbT6DF4JNgQ1O5K7R1qtnNngTQwRrVnV Ucff2KGluDWtov7T2e2atwfv8oSWNGpVJ8iyEYWG4reN5tlylegTX8fNZ9HjwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1701349918; 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=CU9B89oku+kPoMEPdnWUEn8tLk2hLvVv8p7WT57rgTM=; b=6XX7F4kLeeRVBh/lGu8mpBFHR6+yRM2KLPUCjo8rO2r1d02Gl8SUvoIx8R+xoEcQLwcpdK TUShiQRcdEDBvcO/tmSKo13r8o/j9q6ibRQoaYz6VKGwyhGJIuQhdTbr/0OBhgqJuzwJHg 9zLsx8jcVqwcBeLw8Yfy1m8c5bbGnQrWcu2+LhtTKL09hAPeTv3r0Ea5N0B+enChyr6jLz y+NB1qjrKQWjUgyEvIC30PLiLcG4wU6kHyke8oANL7Eolk2sun4P5R+l8UsHUs5yablid6 8yfpEGCNP8Vk1oy7wFd/PEEbKO/tfwWtF+jXY8oRX8V9dA6OCbVwwP4ecaYFtw== ARC-Authentication-Results: i=1; rspamd-696ff67dc8-w477v; 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-Lettuce-Illustrious: 7ddfe81358711390_1701349918912_4035006573 X-MC-Loop-Signature: 1701349918912:2406317969 X-MC-Ingress-Time: 1701349918912 Received: from pdx1-sub0-mail-a301.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.126.216.6 (trex/6.9.2); Thu, 30 Nov 2023 13:11:58 +0000 Received: from localhost.localdomain (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-a301.dreamhost.com (Postfix) with ESMTPSA id 4SgxRf1qqrz64; Thu, 30 Nov 2023 05:11:58 -0800 (PST) From: Siddhesh Poyarekar To: libc-alpha@sourceware.org Cc: fweimer@redhat.com, carlos@redhat.com, adhemerval.zanella@linaro.org Subject: [PATCH v2] Move CVE information into advisories directory Date: Thu, 30 Nov 2023 08:11:48 -0500 Message-ID: <20231130131148.132005-1-siddhesh@sourceware.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Spam-Status: No, score=-1172.0 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_H5, 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+patchwork=sourceware.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 v1: - The advisory files now have GLIBC-SA- numbers that the glibc project can use independently of Mitre. - Version and release numbers are now gleaned from version.h and include/features.h instead of tag munging. - Check for existence of advisories as a directory. - The format generated by process-fixed-cves.sh is modified to accommodate GLIBC-SA-* numbers. - Port all CVEs assigned in 2023 to assign corresponding GLIBC-SA-* numbers. Release process changes: - Auto-generate CVE list from the advisory files to add to NEWS at release time. - Replace the advisories directory with a file containing a link to the advisories directory on gitweb just before tagging. Reinstate the directory right after opening master for development. NEWS | 24 +++++--------------- advisories/GLIBC-SA-2023-0001 | 15 +++++++++++++ advisories/GLIBC-SA-2023-0002 | 14 ++++++++++++ advisories/GLIBC-SA-2023-0003 | 11 ++++++++++ advisories/GLIBC-SA-2023-0004 | 13 +++++++++++ advisories/GLIBC-SA-2023-0005 | 11 ++++++++++ scripts/process-fixed-cves.sh | 41 +++++++++++++++++++++++++++++++++++ 7 files changed, 110 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..9072fe1a34 --- /dev/null +++ b/advisories/GLIBC-SA-2023-0001 @@ -0,0 +1,15 @@ +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-since: e88b9f0e5cc50cab57a299dc7efe1a4eb385161d +First-vulnerable-release: 2.37 +Fixed-by: c980549cc6a1c03c23cc2fe3e7b0fe626a0364b0 +Fixed-releases: 2.37, 2.38 diff --git a/advisories/GLIBC-SA-2023-0002 b/advisories/GLIBC-SA-2023-0002 new file mode 100644 index 0000000000..f6e791601c --- /dev/null +++ b/advisories/GLIBC-SA-2023-0002 @@ -0,0 +1,14 @@ +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-since: f282cdbe7f436c75864e5640a409a10485e9abb2 +First-vulnerable-release: 2.36 +Fixed-by: bd77dd7e73e3530203be1c52c8a29d08270cb25d +Fixed-releases: 2.36, 2.37, 2.38, 2.39 diff --git a/advisories/GLIBC-SA-2023-0003 b/advisories/GLIBC-SA-2023-0003 new file mode 100644 index 0000000000..5c44df6e7d --- /dev/null +++ b/advisories/GLIBC-SA-2023-0003 @@ -0,0 +1,11 @@ +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 +Fixed-by: 973fe93a5675c42798b2161c6f29c01b0e243994 +Fixed-releases: 2.34, 2.35, 2.36, 2.37, 2.38, 2.39 diff --git a/advisories/GLIBC-SA-2023-0004 b/advisories/GLIBC-SA-2023-0004 new file mode 100644 index 0000000000..4babf678a5 --- /dev/null +++ b/advisories/GLIBC-SA-2023-0004 @@ -0,0 +1,13 @@ +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-since: 2ed18c5b534d9e92fc006202a5af0df6b72e7aca +First-vulnerable-release: 2.34 +Fixed-by: 1056e5b4c3f2d90ed2b4a55f96add28da2f4c8fa +Fixed-releases: 2.34, 2.35, 2.36, 2.37, 2.38, 2.39 diff --git a/advisories/GLIBC-SA-2023-0005 b/advisories/GLIBC-SA-2023-0005 new file mode 100644 index 0000000000..c094370c5a --- /dev/null +++ b/advisories/GLIBC-SA-2023-0005 @@ -0,0 +1,11 @@ +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-since: 973fe93a5675c42798b2161c6f29c01b0e243994 +Fixed-by: ec6b95c3303c700eb89eebeda2d7264cc184a796 +Fixed-releases: 2.34, 2.35, 2.36, 2.37, 2.38, 2.39 diff --git a/scripts/process-fixed-cves.sh b/scripts/process-fixed-cves.sh new file mode 100755 index 0000000000..b1ccaf7215 --- /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 "^Fixed-releases: .*$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