Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

Merge #287594: glibc: 2.38-44 -> 2.39-5

...into staging

+666 -154
+7
pkgs/applications/emulators/dolphin-emu/default.nix
··· 1 1 { lib 2 2 , stdenv 3 3 , fetchFromGitHub 4 + , fetchpatch 4 5 , cmake 5 6 , pkg-config 6 7 , wrapQtAppsHook ··· 71 72 patches = [ 72 73 # Remove when merged https://github.com/dolphin-emu/dolphin/pull/12070 73 74 ./find-minizip-ng.patch 75 + 76 + # fix buidl w/ glibc-2.39 77 + (fetchpatch { 78 + url = "https://github.com/dolphin-emu/dolphin/commit/3da2e15e6b95f02f66df461e87c8b896e450fdab.patch"; 79 + hash = "sha256-+8yGF412wQUYbyEuYWd41pgOgEbhCaezexxcI5CNehc="; 80 + }) 74 81 ]; 75 82 76 83 strictDeps = true;
+6 -1
pkgs/development/compilers/swift/sourcekit-lsp/default.nix
··· 1 1 { lib 2 2 , stdenv 3 3 , callPackage 4 + , fetchpatch 4 5 , pkg-config 5 6 , swift 6 7 , swiftpm ··· 41 42 patch -p1 -d .build/checkouts/indexstore-db -i ${./patches/indexstore-db-macos-target.patch} 42 43 43 44 swiftpmMakeMutable swift-tools-support-core 44 - patch -p1 -d .build/checkouts/swift-tools-support-core -i ${./patches/force-unwrap-file-handles.patch} 45 + patch -p1 -d .build/checkouts/swift-tools-support-core -i ${fetchpatch { 46 + url = "https://github.com/apple/swift-tools-support-core/commit/990afca47e75cce136d2f59e464577e68a164035.patch"; 47 + hash = "sha256-PLzWsp+syiUBHhEFS8+WyUcSae5p0Lhk7SSRdNvfouE="; 48 + includes = [ "Sources/TSCBasic/FileSystem.swift" ]; 49 + }} 45 50 46 51 # This toggles a section specific to Xcode XCTest, which doesn't work on 47 52 # Darwin, where we also use swift-corelibs-xctest.
+5 -1
pkgs/development/compilers/swift/swift-driver/default.nix
··· 54 54 55 55 configurePhase = generated.configure + '' 56 56 swiftpmMakeMutable swift-tools-support-core 57 - patch -p1 -d .build/checkouts/swift-tools-support-core -i ${./patches/force-unwrap-file-handles.patch} 57 + patch -p1 -d .build/checkouts/swift-tools-support-core -i ${fetchpatch { 58 + url = "https://github.com/apple/swift-tools-support-core/commit/990afca47e75cce136d2f59e464577e68a164035.patch"; 59 + hash = "sha256-PLzWsp+syiUBHhEFS8+WyUcSae5p0Lhk7SSRdNvfouE="; 60 + includes = [ "Sources/TSCBasic/FileSystem.swift" ]; 61 + }} 58 62 ''; 59 63 60 64 # TODO: Tests depend on indexstore-db being provided by an existing Swift
-33
pkgs/development/compilers/swift/swift-driver/patches/force-unwrap-file-handles.patch
··· 1 - From 8d9ab4b6ed24a97e8af0cc338a52aacdcf438b8c Mon Sep 17 00:00:00 2001 2 - From: Pavel Sobolev <paveloom@riseup.net> 3 - Date: Tue, 21 Nov 2023 20:53:33 +0300 4 - Subject: [PATCH] Force-unwrap file handles. 5 - 6 - --- 7 - Sources/TSCBasic/FileSystem.swift | 4 ++-- 8 - 1 file changed, 2 insertions(+), 2 deletions(-) 9 - 10 - diff --git a/Sources/TSCBasic/FileSystem.swift b/Sources/TSCBasic/FileSystem.swift 11 - index 3a63bdf..a1f3d9d 100644 12 - --- a/Sources/TSCBasic/FileSystem.swift 13 - +++ b/Sources/TSCBasic/FileSystem.swift 14 - @@ -425,7 +425,7 @@ private class LocalFileSystem: FileSystem { 15 - if fp == nil { 16 - throw FileSystemError(errno: errno, path) 17 - } 18 - - defer { fclose(fp) } 19 - + defer { fclose(fp!) } 20 - 21 - // Read the data one block at a time. 22 - let data = BufferedOutputByteStream() 23 - @@ -455,7 +455,7 @@ private class LocalFileSystem: FileSystem { 24 - if fp == nil { 25 - throw FileSystemError(errno: errno, path) 26 - } 27 - - defer { fclose(fp) } 28 - + defer { fclose(fp!) } 29 - 30 - // Write the data in one chunk. 31 - var contents = bytes.contents 32 - -- 33 - 2.42.0
+6 -1
pkgs/development/compilers/swift/swift-format/default.nix
··· 1 1 { lib 2 2 , stdenv 3 + , fetchpatch 3 4 , callPackage 4 5 , swift 5 6 , swiftpm ··· 21 22 22 23 configurePhase = generated.configure + '' 23 24 swiftpmMakeMutable swift-tools-support-core 24 - patch -p1 -d .build/checkouts/swift-tools-support-core -i ${./patches/force-unwrap-file-handles.patch} 25 + patch -p1 -d .build/checkouts/swift-tools-support-core -i ${fetchpatch { 26 + url = "https://github.com/apple/swift-tools-support-core/commit/990afca47e75cce136d2f59e464577e68a164035.patch"; 27 + hash = "sha256-PLzWsp+syiUBHhEFS8+WyUcSae5p0Lhk7SSRdNvfouE="; 28 + includes = [ "Sources/TSCBasic/FileSystem.swift" ]; 29 + }} 25 30 ''; 26 31 27 32 # We only install the swift-format binary, so don't need the other products.
-33
pkgs/development/compilers/swift/swift-format/patches/force-unwrap-file-handles.patch
··· 1 - From 8d9ab4b6ed24a97e8af0cc338a52aacdcf438b8c Mon Sep 17 00:00:00 2001 2 - From: Pavel Sobolev <paveloom@riseup.net> 3 - Date: Tue, 21 Nov 2023 20:53:33 +0300 4 - Subject: [PATCH] Force-unwrap file handles. 5 - 6 - --- 7 - Sources/TSCBasic/FileSystem.swift | 4 ++-- 8 - 1 file changed, 2 insertions(+), 2 deletions(-) 9 - 10 - diff --git a/Sources/TSCBasic/FileSystem.swift b/Sources/TSCBasic/FileSystem.swift 11 - index 3a63bdf..a1f3d9d 100644 12 - --- a/Sources/TSCBasic/FileSystem.swift 13 - +++ b/Sources/TSCBasic/FileSystem.swift 14 - @@ -425,7 +425,7 @@ private class LocalFileSystem: FileSystem { 15 - if fp == nil { 16 - throw FileSystemError(errno: errno, path) 17 - } 18 - - defer { fclose(fp) } 19 - + defer { fclose(fp!) } 20 - 21 - // Read the data one block at a time. 22 - let data = BufferedOutputByteStream() 23 - @@ -455,7 +455,7 @@ private class LocalFileSystem: FileSystem { 24 - if fp == nil { 25 - throw FileSystemError(errno: errno, path) 26 - } 27 - - defer { fclose(fp) } 28 - + defer { fclose(fp!) } 29 - 30 - // Write the data in one chunk. 31 - var contents = bytes.contents 32 - -- 33 - 2.42.0
+13 -2
pkgs/development/compilers/swift/swiftpm/default.nix
··· 1 1 { lib 2 2 , stdenv 3 3 , callPackage 4 + , fetchpatch 4 5 , cmake 5 6 , ninja 6 7 , git ··· 195 196 ''; 196 197 }; 197 198 199 + # Part of this patch fixes for glibc 2.39: glibc patch 64b1a44183a3094672ed304532bedb9acc707554 200 + # marks the `FILE*` argument to a few functions including `ferror` & `fread` as non-null. However 201 + # the code passes an `Optional<T>` to these functions. 202 + # This patch uses a `guard` which effectively unwraps the type (or throws an exception). 203 + swift-tools-support-core-glibc-fix = fetchpatch { 204 + url = "https://github.com/apple/swift-tools-support-core/commit/990afca47e75cce136d2f59e464577e68a164035.patch"; 205 + hash = "sha256-PLzWsp+syiUBHhEFS8+WyUcSae5p0Lhk7SSRdNvfouE="; 206 + includes = [ "Sources/TSCBasic/FileSystem.swift" ]; 207 + }; 208 + 198 209 swift-tools-support-core = mkBootstrapDerivation { 199 210 name = "swift-tools-support-core"; 200 211 src = generated.sources.swift-tools-support-core; 201 212 202 213 patches = [ 203 - ./patches/force-unwrap-file-handles.patch 214 + swift-tools-support-core-glibc-fix 204 215 ]; 205 216 206 217 buildInputs = [ ··· 389 400 swiftpmMakeMutable swift-tools-support-core 390 401 substituteInPlace .build/checkouts/swift-tools-support-core/Sources/TSCTestSupport/XCTestCasePerf.swift \ 391 402 --replace 'canImport(Darwin)' 'false' 392 - patch -p1 -d .build/checkouts/swift-tools-support-core -i ${./patches/force-unwrap-file-handles.patch} 403 + patch -p1 -d .build/checkouts/swift-tools-support-core -i ${swift-tools-support-core-glibc-fix} 393 404 394 405 # Prevent a warning about SDK directories we don't have. 395 406 swiftpmMakeMutable swift-driver
-33
pkgs/development/compilers/swift/swiftpm/patches/force-unwrap-file-handles.patch
··· 1 - From 8d9ab4b6ed24a97e8af0cc338a52aacdcf438b8c Mon Sep 17 00:00:00 2001 2 - From: Pavel Sobolev <paveloom@riseup.net> 3 - Date: Tue, 21 Nov 2023 20:53:33 +0300 4 - Subject: [PATCH] Force-unwrap file handles. 5 - 6 - --- 7 - Sources/TSCBasic/FileSystem.swift | 4 ++-- 8 - 1 file changed, 2 insertions(+), 2 deletions(-) 9 - 10 - diff --git a/Sources/TSCBasic/FileSystem.swift b/Sources/TSCBasic/FileSystem.swift 11 - index 3a63bdf..a1f3d9d 100644 12 - --- a/Sources/TSCBasic/FileSystem.swift 13 - +++ b/Sources/TSCBasic/FileSystem.swift 14 - @@ -425,7 +425,7 @@ private class LocalFileSystem: FileSystem { 15 - if fp == nil { 16 - throw FileSystemError(errno: errno, path) 17 - } 18 - - defer { fclose(fp) } 19 - + defer { fclose(fp!) } 20 - 21 - // Read the data one block at a time. 22 - let data = BufferedOutputByteStream() 23 - @@ -455,7 +455,7 @@ private class LocalFileSystem: FileSystem { 24 - if fp == nil { 25 - throw FileSystemError(errno: errno, path) 26 - } 27 - - defer { fclose(fp) } 28 - + defer { fclose(fp!) } 29 - 30 - // Write the data in one chunk. 31 - var contents = bytes.contents 32 - -- 33 - 2.42.0
+18 -18
pkgs/development/libraries/glibc/0001-Revert-Remove-all-usage-of-BASH-or-BASH-in-installed.patch
··· 1 - From cdd0c4b168fe228de97778556cea5c0f936e0e79 Mon Sep 17 00:00:00 2001 1 + From e207c3dbcff1d3d09c60eec99b6fec2a698b01bd Mon Sep 17 00:00:00 2001 2 2 From: Bernardo Meurer <bernardo@meurer.org> 3 3 Date: Fri, 22 Jul 2022 22:11:07 -0700 4 4 Subject: [PATCH] Revert "Remove all usage of @BASH@ or ${BASH} in installed ··· 22 22 8 files changed, 15 insertions(+), 10 deletions(-) 23 23 24 24 diff --git a/debug/Makefile b/debug/Makefile 25 - index 52f9a7852c..22e4ae5461 100644 25 + index 3903cc97a3..b041acca71 100644 26 26 --- a/debug/Makefile 27 27 +++ b/debug/Makefile 28 - @@ -265,8 +265,9 @@ $(objpfx)pcprofiledump: $(objpfx)pcprofiledump.o 28 + @@ -343,8 +343,9 @@ $(objpfx)pcprofiledump: $(objpfx)pcprofiledump.o 29 29 30 30 $(objpfx)xtrace: xtrace.sh 31 31 rm -f $@.new ··· 38 38 && rm -f $@ && mv $@.new $@ && chmod +x $@ 39 39 40 40 diff --git a/debug/xtrace.sh b/debug/xtrace.sh 41 - index 3d1f2af43a..eb2ba7ad4a 100755 41 + index 77ec1d84df..5614404a71 100755 42 42 --- a/debug/xtrace.sh 43 43 +++ b/debug/xtrace.sh 44 44 @@ -1,4 +1,4 @@ 45 45 -#!/bin/bash 46 46 +#! @BASH@ 47 - # Copyright (C) 1999-2023 Free Software Foundation, Inc. 47 + # Copyright (C) 1999-2024 Free Software Foundation, Inc. 48 48 # This file is part of the GNU C Library. 49 49 50 50 diff --git a/elf/Makefile b/elf/Makefile 51 - index 0d19964d42..ee8ee1cd41 100644 51 + index 5d78b659ce..a2145d7b64 100644 52 52 --- a/elf/Makefile 53 53 +++ b/elf/Makefile 54 - @@ -250,7 +250,8 @@ $(objpfx)sotruss-lib.so: $(common-objpfx)libc.so $(objpfx)ld.so \ 54 + @@ -249,7 +249,8 @@ $(objpfx)sotruss-lib.so: $(common-objpfx)libc.so $(objpfx)ld.so \ 55 55 $(common-objpfx)libc_nonshared.a 56 56 57 57 $(objpfx)sotruss: sotruss.sh $(common-objpfx)config.make ··· 61 61 -e 's%@TEXTDOMAINDIR@%$(localedir)%g' \ 62 62 -e 's%@PREFIX@%$(prefix)%g' \ 63 63 -e 's|@PKGVERSION@|$(PKGVERSION)|g' \ 64 - @@ -1396,6 +1397,7 @@ ldd-rewrite = -e 's%@RTLD@%$(rtlddir)/$(rtld-installed-name)%g' \ 64 + @@ -1392,6 +1393,7 @@ ldd-rewrite = -e 's%@RTLD@%$(rtlddir)/$(rtld-installed-name)%g' \ 65 65 -e 's%@VERSION@%$(version)%g' \ 66 66 -e 's|@PKGVERSION@|$(PKGVERSION)|g' \ 67 67 -e 's|@REPORT_BUGS_TO@|$(REPORT_BUGS_TO)|g' \ ··· 70 70 71 71 ifeq ($(ldd-rewrite-script),no) 72 72 diff --git a/elf/ldd.bash.in b/elf/ldd.bash.in 73 - index e45dec5894..e09428506e 100644 73 + index d6b640df66..46111670cd 100644 74 74 --- a/elf/ldd.bash.in 75 75 +++ b/elf/ldd.bash.in 76 76 @@ -1,4 +1,4 @@ 77 77 -#!/bin/bash 78 78 +#! @BASH@ 79 - # Copyright (C) 1996-2023 Free Software Foundation, Inc. 79 + # Copyright (C) 1996-2024 Free Software Foundation, Inc. 80 80 # This file is part of the GNU C Library. 81 81 82 82 diff --git a/elf/sotruss.sh b/elf/sotruss.sh 83 - index 874a6bed3f..7cc154561e 100755 83 + index ac1a83984e..2bf17c518e 100755 84 84 --- a/elf/sotruss.sh 85 85 +++ b/elf/sotruss.sh 86 86 @@ -1,4 +1,4 @@ 87 87 -#!/bin/bash 88 88 +#! @BASH@ 89 - # Copyright (C) 2011-2023 Free Software Foundation, Inc. 89 + # Copyright (C) 2011-2024 Free Software Foundation, Inc. 90 90 # This file is part of the GNU C Library. 91 91 92 92 diff --git a/malloc/Makefile b/malloc/Makefile 93 - index dfb51d344c..574b5e9579 100644 93 + index c83ade5f10..8dd9174b79 100644 94 94 --- a/malloc/Makefile 95 95 +++ b/malloc/Makefile 96 - @@ -306,8 +306,9 @@ $(objpfx)mtrace: mtrace.pl 96 + @@ -312,8 +312,9 @@ $(objpfx)mtrace: mtrace.pl 97 97 98 98 $(objpfx)memusage: memusage.sh 99 99 rm -f $@.new ··· 106 106 && rm -f $@ && mv $@.new $@ && chmod +x $@ 107 107 108 108 diff --git a/malloc/memusage.sh b/malloc/memusage.sh 109 - index b1f5848b74..329e36ef8a 100755 109 + index d2d9d17ea8..2e7efc9049 100755 110 110 --- a/malloc/memusage.sh 111 111 +++ b/malloc/memusage.sh 112 112 @@ -1,4 +1,4 @@ 113 113 -#!/bin/bash 114 114 +#! @BASH@ 115 - # Copyright (C) 1999-2023 Free Software Foundation, Inc. 115 + # Copyright (C) 1999-2024 Free Software Foundation, Inc. 116 116 # This file is part of the GNU C Library. 117 117 118 118 diff --git a/timezone/Makefile b/timezone/Makefile 119 - index 0306c0bca9..de9bbcc815 100644 119 + index d7acb387ba..c8e203ea3a 100644 120 120 --- a/timezone/Makefile 121 121 +++ b/timezone/Makefile 122 122 @@ -132,7 +132,8 @@ $(testdata)/XT5: testdata/gen-XT5.sh ··· 130 130 -e '/PKGVERSION=/s|=.*|="$(PKGVERSION)"|' \ 131 131 -e '/REPORT_BUGS_TO=/s|=.*|="$(REPORT_BUGS_TO)"|' \ 132 132 -- 133 - 2.38.4 133 + 2.42.0 134 134
pkgs/development/libraries/glibc/2.38-master.patch.gz

This is a binary file and will not be displayed.

+566
pkgs/development/libraries/glibc/2.39-master.patch
··· 1 + commit 6d1e3fb07b45e2e31e469b16cf21b24bccf8914c 2 + Author: Andreas K. Hüttel <dilfridge@gentoo.org> 3 + Date: Wed Jan 31 02:12:43 2024 +0100 4 + 5 + Replace advisories directory 6 + 7 + Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org> 8 + 9 + diff --git a/ADVISORIES b/ADVISORIES 10 + new file mode 100644 11 + index 0000000000..d4e33f2df3 12 + --- /dev/null 13 + +++ b/ADVISORIES 14 + @@ -0,0 +1,2 @@ 15 + +For the GNU C Library Security Advisories, see the git master branch: 16 + +https://sourceware.org/git/?p=glibc.git;a=tree;f=advisories;hb=HEAD 17 + diff --git a/advisories/GLIBC-SA-2023-0001 b/advisories/GLIBC-SA-2023-0001 18 + deleted file mode 100644 19 + index 3d19c91b6a..0000000000 20 + --- a/advisories/GLIBC-SA-2023-0001 21 + +++ /dev/null 22 + @@ -1,14 +0,0 @@ 23 + -printf: incorrect output for integers with thousands separator and width field 24 + - 25 + -When the printf family of functions is called with a format specifier 26 + -that uses an <apostrophe> (enable grouping) and a minimum width 27 + -specifier, the resulting output could be larger than reasonably expected 28 + -by a caller that computed a tight bound on the buffer size. The 29 + -resulting larger than expected output could result in a buffer overflow 30 + -in the printf family of functions. 31 + - 32 + -CVE-Id: CVE-2023-25139 33 + -Public-Date: 2023-02-02 34 + -Vulnerable-Commit: e88b9f0e5cc50cab57a299dc7efe1a4eb385161d (2.37) 35 + -Fix-Commit: c980549cc6a1c03c23cc2fe3e7b0fe626a0364b0 (2.38) 36 + -Fix-Commit: 07b9521fc6369d000216b96562ff7c0ed32a16c4 (2.37-4) 37 + diff --git a/advisories/GLIBC-SA-2023-0002 b/advisories/GLIBC-SA-2023-0002 38 + deleted file mode 100644 39 + index 5122669a64..0000000000 40 + --- a/advisories/GLIBC-SA-2023-0002 41 + +++ /dev/null 42 + @@ -1,15 +0,0 @@ 43 + -getaddrinfo: Stack read overflow in no-aaaa mode 44 + - 45 + -If the system is configured in no-aaaa mode via /etc/resolv.conf, 46 + -getaddrinfo is called for the AF_UNSPEC address family, and a DNS 47 + -response is received over TCP that is larger than 2048 bytes, 48 + -getaddrinfo may potentially disclose stack contents via the returned 49 + -address data, or crash. 50 + - 51 + -CVE-Id: CVE-2023-4527 52 + -Public-Date: 2023-09-12 53 + -Vulnerable-Commit: f282cdbe7f436c75864e5640a409a10485e9abb2 (2.36) 54 + -Fix-Commit: bd77dd7e73e3530203be1c52c8a29d08270cb25d (2.39) 55 + -Fix-Commit: 4ea972b7edd7e36610e8cde18bf7a8149d7bac4f (2.36-113) 56 + -Fix-Commit: b7529346025a130fee483d42178b5c118da971bb (2.37-38) 57 + -Fix-Commit: b25508dd774b617f99419bdc3cf2ace4560cd2d6 (2.38-19) 58 + diff --git a/advisories/GLIBC-SA-2023-0003 b/advisories/GLIBC-SA-2023-0003 59 + deleted file mode 100644 60 + index d3aef80348..0000000000 61 + --- a/advisories/GLIBC-SA-2023-0003 62 + +++ /dev/null 63 + @@ -1,15 +0,0 @@ 64 + -getaddrinfo: Potential use-after-free 65 + - 66 + -When an NSS plugin only implements the _gethostbyname2_r and 67 + -_getcanonname_r callbacks, getaddrinfo could use memory that was freed 68 + -during buffer resizing, potentially causing a crash or read or write to 69 + -arbitrary memory. 70 + - 71 + -CVE-Id: CVE-2023-4806 72 + -Public-Date: 2023-09-12 73 + -Fix-Commit: 973fe93a5675c42798b2161c6f29c01b0e243994 (2.39) 74 + -Fix-Commit: e09ee267c03e3150c2c9ba28625ab130705a485e (2.34-420) 75 + -Fix-Commit: e3ccb230a961b4797510e6a1f5f21fd9021853e7 (2.35-270) 76 + -Fix-Commit: a9728f798ec7f05454c95637ee6581afaa9b487d (2.36-115) 77 + -Fix-Commit: 6529a7466c935f36e9006b854d6f4e1d4876f942 (2.37-39) 78 + -Fix-Commit: 00ae4f10b504bc4564e9f22f00907093f1ab9338 (2.38-20) 79 + diff --git a/advisories/GLIBC-SA-2023-0004 b/advisories/GLIBC-SA-2023-0004 80 + deleted file mode 100644 81 + index 5286a7aa54..0000000000 82 + --- a/advisories/GLIBC-SA-2023-0004 83 + +++ /dev/null 84 + @@ -1,16 +0,0 @@ 85 + -tunables: local privilege escalation through buffer overflow 86 + - 87 + -If a tunable of the form NAME=NAME=VAL is passed in the environment of a 88 + -setuid program and NAME is valid, it may result in a buffer overflow, 89 + -which could be exploited to achieve escalated privileges. This flaw was 90 + -introduced in glibc 2.34. 91 + - 92 + -CVE-Id: CVE-2023-4911 93 + -Public-Date: 2023-10-03 94 + -Vulnerable-Commit: 2ed18c5b534d9e92fc006202a5af0df6b72e7aca (2.34) 95 + -Fix-Commit: 1056e5b4c3f2d90ed2b4a55f96add28da2f4c8fa (2.39) 96 + -Fix-Commit: dcc367f148bc92e7f3778a125f7a416b093964d9 (2.34-423) 97 + -Fix-Commit: c84018a05aec80f5ee6f682db0da1130b0196aef (2.35-274) 98 + -Fix-Commit: 22955ad85186ee05834e47e665056148ca07699c (2.36-118) 99 + -Fix-Commit: b4e23c75aea756b4bddc4abcf27a1c6dca8b6bd3 (2.37-45) 100 + -Fix-Commit: 750a45a783906a19591fb8ff6b7841470f1f5701 (2.38-27) 101 + diff --git a/advisories/GLIBC-SA-2023-0005 b/advisories/GLIBC-SA-2023-0005 102 + deleted file mode 100644 103 + index cc4eb90b82..0000000000 104 + --- a/advisories/GLIBC-SA-2023-0005 105 + +++ /dev/null 106 + @@ -1,18 +0,0 @@ 107 + -getaddrinfo: DoS due to memory leak 108 + - 109 + -The fix for CVE-2023-4806 introduced a memory leak when an application 110 + -calls getaddrinfo for AF_INET6 with AI_CANONNAME, AI_ALL and AI_V4MAPPED 111 + -flags set. 112 + - 113 + -CVE-Id: CVE-2023-5156 114 + -Public-Date: 2023-09-25 115 + -Vulnerable-Commit: e09ee267c03e3150c2c9ba28625ab130705a485e (2.34-420) 116 + -Vulnerable-Commit: e3ccb230a961b4797510e6a1f5f21fd9021853e7 (2.35-270) 117 + -Vulnerable-Commit: a9728f798ec7f05454c95637ee6581afaa9b487d (2.36-115) 118 + -Vulnerable-Commit: 6529a7466c935f36e9006b854d6f4e1d4876f942 (2.37-39) 119 + -Vulnerable-Commit: 00ae4f10b504bc4564e9f22f00907093f1ab9338 (2.38-20) 120 + -Fix-Commit: 8006457ab7e1cd556b919f477348a96fe88f2e49 (2.34-421) 121 + -Fix-Commit: 17092c0311f954e6f3c010f73ce3a78c24ac279a (2.35-272) 122 + -Fix-Commit: 856bac55f98dc840e7c27cfa82262b933385de90 (2.36-116) 123 + -Fix-Commit: 4473d1b87d04b25cdd0e0354814eeaa421328268 (2.37-42) 124 + -Fix-Commit: 5ee59ca371b99984232d7584fe2b1a758b4421d3 (2.38-24) 125 + diff --git a/advisories/GLIBC-SA-2024-0001 b/advisories/GLIBC-SA-2024-0001 126 + deleted file mode 100644 127 + index 28931c75ae..0000000000 128 + --- a/advisories/GLIBC-SA-2024-0001 129 + +++ /dev/null 130 + @@ -1,15 +0,0 @@ 131 + -syslog: Heap buffer overflow in __vsyslog_internal 132 + - 133 + -__vsyslog_internal did not handle a case where printing a SYSLOG_HEADER 134 + -containing a long program name failed to update the required buffer 135 + -size, leading to the allocation and overflow of a too-small buffer on 136 + -the heap. 137 + - 138 + -CVE-Id: CVE-2023-6246 139 + -Public-Date: 2024-01-30 140 + -Vulnerable-Commit: 52a5be0df411ef3ff45c10c7c308cb92993d15b1 (2.37) 141 + -Fix-Commit: 6bd0e4efcc78f3c0115e5ea9739a1642807450da (2.39) 142 + -Fix-Commit: 23514c72b780f3da097ecf33a793b7ba9c2070d2 (2.38-42) 143 + -Fix-Commit: 97a4292aa4a2642e251472b878d0ec4c46a0e59a (2.37-57) 144 + -Vulnerable-Commit: b0e7888d1fa2dbd2d9e1645ec8c796abf78880b9 (2.36-16) 145 + -Fix-Commit: d1a83b6767f68b3cb5b4b4ea2617254acd040c82 (2.36-126) 146 + diff --git a/advisories/GLIBC-SA-2024-0002 b/advisories/GLIBC-SA-2024-0002 147 + deleted file mode 100644 148 + index 940bfcf2fc..0000000000 149 + --- a/advisories/GLIBC-SA-2024-0002 150 + +++ /dev/null 151 + @@ -1,15 +0,0 @@ 152 + -syslog: Heap buffer overflow in __vsyslog_internal 153 + - 154 + -__vsyslog_internal used the return value of snprintf/vsnprintf to 155 + -calculate buffer sizes for memory allocation. If these functions (for 156 + -any reason) failed and returned -1, the resulting buffer would be too 157 + -small to hold output. 158 + - 159 + -CVE-Id: CVE-2023-6779 160 + -Public-Date: 2024-01-30 161 + -Vulnerable-Commit: 52a5be0df411ef3ff45c10c7c308cb92993d15b1 (2.37) 162 + -Fix-Commit: 7e5a0c286da33159d47d0122007aac016f3e02cd (2.39) 163 + -Fix-Commit: d0338312aace5bbfef85e03055e1212dd0e49578 (2.38-43) 164 + -Fix-Commit: 67062eccd9a65d7fda9976a56aeaaf6c25a80214 (2.37-58) 165 + -Vulnerable-Commit: b0e7888d1fa2dbd2d9e1645ec8c796abf78880b9 (2.36-16) 166 + -Fix-Commit: 2bc9d7c002bdac38b5c2a3f11b78e309d7765b83 (2.36-127) 167 + diff --git a/advisories/GLIBC-SA-2024-0003 b/advisories/GLIBC-SA-2024-0003 168 + deleted file mode 100644 169 + index b43a5150ab..0000000000 170 + --- a/advisories/GLIBC-SA-2024-0003 171 + +++ /dev/null 172 + @@ -1,13 +0,0 @@ 173 + -syslog: Integer overflow in __vsyslog_internal 174 + - 175 + -__vsyslog_internal calculated a buffer size by adding two integers, but 176 + -did not first check if the addition would overflow. 177 + - 178 + -CVE-Id: CVE-2023-6780 179 + -Public-Date: 2024-01-30 180 + -Vulnerable-Commit: 52a5be0df411ef3ff45c10c7c308cb92993d15b1 (2.37) 181 + -Fix-Commit: ddf542da94caf97ff43cc2875c88749880b7259b (2.39) 182 + -Fix-Commit: d37c2b20a4787463d192b32041c3406c2bd91de0 (2.38-44) 183 + -Fix-Commit: 2b58cba076e912961ceaa5fa58588e4b10f791c0 (2.37-59) 184 + -Vulnerable-Commit: b0e7888d1fa2dbd2d9e1645ec8c796abf78880b9 (2.36-16) 185 + -Fix-Commit: b9b7d6a27aa0632f334352fa400771115b3c69b7 (2.36-128) 186 + diff --git a/advisories/README b/advisories/README 187 + deleted file mode 100644 188 + index 94e68b1350..0000000000 189 + --- a/advisories/README 190 + +++ /dev/null 191 + @@ -1,73 +0,0 @@ 192 + -GNU C Library Security Advisory Format 193 + -====================================== 194 + - 195 + -Security advisories in this directory follow a simple git commit log 196 + -format, with a heading and free-format description augmented with tags 197 + -to allow parsing key information. References to code changes are 198 + -specific to the glibc repository and follow a specific format: 199 + - 200 + - Tag-name: <commit-ref> (release-version) 201 + - 202 + -The <commit-ref> indicates a specific commit in the repository. The 203 + -release-version indicates the publicly consumable release in which this 204 + -commit is known to exist. The release-version is derived from the 205 + -git-describe format, (i.e. stripped out from glibc-2.34.NNN-gxxxx) and 206 + -is of the form 2.34-NNN. If the -NNN suffix is absent, it means that 207 + -the change is in that release tarball, otherwise the change is on the 208 + -release/2.YY/master branch and not in any released tarball. 209 + - 210 + -The following tags are currently being used: 211 + - 212 + -CVE-Id: 213 + -This is the CVE-Id assigned under the CVE Program 214 + -(https://www.cve.org/). 215 + - 216 + -Public-Date: 217 + -The date this issue became publicly known. 218 + - 219 + -Vulnerable-Commit: 220 + -The commit that introduced this vulnerability. There could be multiple 221 + -entries, one for each release branch in the glibc repository; the 222 + -release-version portion of this tag should tell you which branch this is 223 + -on. 224 + - 225 + -Fix-Commit: 226 + -The commit that fixed this vulnerability. There could be multiple 227 + -entries for each release branch in the glibc repository, indicating that 228 + -all of those commits contributed to fixing that issue in each of those 229 + -branches. 230 + - 231 + -Adding an Advisory 232 + ------------------- 233 + - 234 + -An advisory for a CVE needs to be added on the master branch in two steps: 235 + - 236 + -1. Add the text of the advisory without any Fix-Commit tags along with 237 + - the fix for the CVE. Add the Vulnerable-Commit tag, if applicable. 238 + - The advisories directory does not exist in release branches, so keep 239 + - the advisory text commit distinct from the code changes, to ease 240 + - backports. Ask for the GLIBC-SA advisory number from the security 241 + - team. 242 + - 243 + -2. Finish all backports on release branches and then back on the msater 244 + - branch, add all commit refs to the advisory using the Fix-Commit 245 + - tags. Don't bother adding the release-version subscript since the 246 + - next step will overwrite it. 247 + - 248 + -3. Run the process-advisories.sh script in the scripts directory on the 249 + - advisory: 250 + - 251 + - scripts/process-advisories.sh update GLIBC-SA-YYYY-NNNN 252 + - 253 + - (replace YYYY-NNNN with the actual advisory number). 254 + - 255 + -4. Verify the updated advisory and push the result. 256 + - 257 + -Getting a NEWS snippet from advisories 258 + --------------------------------------- 259 + - 260 + -Run: 261 + - 262 + - scripts/process-advisories.sh news 263 + - 264 + -and copy the content into the NEWS file. 265 + 266 + commit 63295e4fda1f6dab4bf7442706fe303bf283036c 267 + Author: Adhemerval Zanella <adhemerval.zanella@linaro.org> 268 + Date: Mon Feb 5 16:10:24 2024 +0000 269 + 270 + arm: Remove wrong ldr from _dl_start_user (BZ 31339) 271 + 272 + The commit 49d877a80b29d3002887b084eec6676d9f5fec18 (arm: Remove 273 + _dl_skip_args usage) removed the _SKIP_ARGS literal, which was 274 + previously loader to r4 on loader _start. However, the cleanup did not 275 + remove the following 'ldr r4, [sl, r4]' on _dl_start_user, used to check 276 + to skip the arguments after ld self-relocations. 277 + 278 + In my testing, the kernel initially set r4 to 0, which makes the 279 + ldr instruction just read the _GLOBAL_OFFSET_TABLE_. However, since r4 280 + is a callee-saved register; a different runtime might not zero 281 + initialize it and thus trigger an invalid memory access. 282 + 283 + Checked on arm-linux-gnu. 284 + 285 + Reported-by: Adrian Ratiu <adrian.ratiu@collabora.com> 286 + Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com> 287 + (cherry picked from commit 1e25112dc0cb2515d27d8d178b1ecce778a9d37a) 288 + 289 + diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h 290 + index b857bbc868..dd1a0f6b6e 100644 291 + --- a/sysdeps/arm/dl-machine.h 292 + +++ b/sysdeps/arm/dl-machine.h 293 + @@ -139,7 +139,6 @@ _start:\n\ 294 + _dl_start_user:\n\ 295 + adr r6, .L_GET_GOT\n\ 296 + add sl, sl, r6\n\ 297 + - ldr r4, [sl, r4]\n\ 298 + @ save the entry point in another register\n\ 299 + mov r6, r0\n\ 300 + @ get the original arg count\n\ 301 + 302 + commit 312e159626b67fe11f39e83e222cf4348a3962f3 303 + Author: Adhemerval Zanella <adhemerval.zanella@linaro.org> 304 + Date: Thu Feb 1 14:29:53 2024 -0300 305 + 306 + mips: FIx clone3 implementation (BZ 31325) 307 + 308 + For o32 we need to setup a minimal stack frame to allow cprestore 309 + on __thread_start_clone3 (which instruct the linker to save the 310 + gp for PIC). Also, there is no guarantee by kABI that $8 will be 311 + preserved after syscall execution, so we need to save it on the 312 + provided stack. 313 + 314 + Checked on mipsel-linux-gnu. 315 + 316 + Reported-by: Khem Raj <raj.khem@gmail.com> 317 + Tested-by: Khem Raj <raj.khem@gmail.com> 318 + (cherry picked from commit bbd248ac0d75efdef8fe61ea69b1fb25fb95b6e7) 319 + 320 + diff --git a/sysdeps/unix/sysv/linux/mips/clone3.S b/sysdeps/unix/sysv/linux/mips/clone3.S 321 + index e9fec2fa47..481b8ae963 100644 322 + --- a/sysdeps/unix/sysv/linux/mips/clone3.S 323 + +++ b/sysdeps/unix/sysv/linux/mips/clone3.S 324 + @@ -37,11 +37,6 @@ 325 + 326 + .text 327 + .set nomips16 328 + -#if _MIPS_SIM == _ABIO32 329 + -# define EXTRA_LOCALS 1 330 + -#else 331 + -# define EXTRA_LOCALS 0 332 + -#endif 333 + #define FRAMESZ ((NARGSAVE*SZREG)+ALSZ)&ALMASK 334 + GPOFF= FRAMESZ-(1*SZREG) 335 + NESTED(__clone3, SZREG, sp) 336 + @@ -68,8 +63,31 @@ NESTED(__clone3, SZREG, sp) 337 + beqz a0, L(error) /* No NULL cl_args pointer. */ 338 + beqz a2, L(error) /* No NULL function pointer. */ 339 + 340 + +#if _MIPS_SIM == _ABIO32 341 + + /* Both stack and stack_size on clone_args are defined as uint64_t, and 342 + + there is no need to handle values larger than to 32 bits for o32. */ 343 + +# if __BYTE_ORDER == __BIG_ENDIAN 344 + +# define CL_STACKPOINTER_OFFSET 44 345 + +# define CL_STACKSIZE_OFFSET 52 346 + +# else 347 + +# define CL_STACKPOINTER_OFFSET 40 348 + +# define CL_STACKSIZE_OFFSET 48 349 + +# endif 350 + + 351 + + /* For o32 we need to setup a minimal stack frame to allow cprestore 352 + + on __thread_start_clone3. Also there is no guarantee by kABI that 353 + + $8 will be preserved after syscall execution (so we need to save it 354 + + on the provided stack). */ 355 + + lw t0, CL_STACKPOINTER_OFFSET(a0) /* Load the stack pointer. */ 356 + + lw t1, CL_STACKSIZE_OFFSET(a0) /* Load the stack_size. */ 357 + + addiu t1, -32 /* Update the stack size. */ 358 + + addu t2, t1, t0 /* Calculate the thread stack. */ 359 + + sw a3, 0(t2) /* Save argument pointer. */ 360 + + sw t1, CL_STACKSIZE_OFFSET(a0) /* Save the new stack size. */ 361 + +#else 362 + move $8, a3 /* a3 is set to 0/1 for syscall success/error 363 + while a4/$8 is returned unmodified. */ 364 + +#endif 365 + 366 + /* Do the system call, the kernel expects: 367 + v0: system call number 368 + @@ -125,7 +143,11 @@ L(thread_start_clone3): 369 + 370 + /* Restore the arg for user's function. */ 371 + move t9, a2 /* Function pointer. */ 372 + +#if _MIPS_SIM == _ABIO32 373 + + PTR_L a0, 0(sp) 374 + +#else 375 + move a0, $8 /* Argument pointer. */ 376 + +#endif 377 + 378 + /* Call the user's function. */ 379 + jal t9 380 + 381 + commit d0724994de40934c552f1f68de89053848a44927 382 + Author: Xi Ruoyao <xry111@xry111.site> 383 + Date: Thu Feb 22 21:26:55 2024 +0100 384 + 385 + math: Update mips64 ulps 386 + 387 + Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org> 388 + (cherry picked from commit e2a65ecc4b30a797df7dc6529f09b712aa256029) 389 + 390 + diff --git a/sysdeps/mips/mips64/libm-test-ulps b/sysdeps/mips/mips64/libm-test-ulps 391 + index 78969745b2..933aba4735 100644 392 + --- a/sysdeps/mips/mips64/libm-test-ulps 393 + +++ b/sysdeps/mips/mips64/libm-test-ulps 394 + @@ -1066,17 +1066,17 @@ double: 1 395 + ldouble: 1 396 + 397 + Function: "j0": 398 + -double: 2 399 + +double: 3 400 + float: 9 401 + ldouble: 2 402 + 403 + Function: "j0_downward": 404 + -double: 5 405 + +double: 6 406 + float: 9 407 + ldouble: 9 408 + 409 + Function: "j0_towardzero": 410 + -double: 6 411 + +double: 7 412 + float: 9 413 + ldouble: 9 414 + 415 + @@ -1146,6 +1146,7 @@ float: 6 416 + ldouble: 8 417 + 418 + Function: "log": 419 + +double: 1 420 + float: 1 421 + ldouble: 1 422 + 423 + 424 + commit e0910f1d3278f05439fb434ee528fc9be1b6bd5e 425 + Author: Stefan Liebler <stli@linux.ibm.com> 426 + Date: Thu Feb 22 15:03:27 2024 +0100 427 + 428 + S390: Do not clobber r7 in clone [BZ #31402] 429 + 430 + Starting with commit e57d8fc97b90127de4ed3e3a9cdf663667580935 431 + "S390: Always use svc 0" 432 + clone clobbers the call-saved register r7 in error case: 433 + function or stack is NULL. 434 + 435 + This patch restores the saved registers also in the error case. 436 + Furthermore the existing test misc/tst-clone is extended to check 437 + all error cases and that clone does not clobber registers in this 438 + error case. 439 + 440 + (cherry picked from commit 02782fd12849b6673cb5c2728cb750e8ec295aa3) 441 + 442 + diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/clone.S b/sysdeps/unix/sysv/linux/s390/s390-32/clone.S 443 + index 4c882ef2ee..a7a863242c 100644 444 + --- a/sysdeps/unix/sysv/linux/s390/s390-32/clone.S 445 + +++ b/sysdeps/unix/sysv/linux/s390/s390-32/clone.S 446 + @@ -53,6 +53,7 @@ ENTRY(__clone) 447 + br %r14 448 + error: 449 + lhi %r2,-EINVAL 450 + + lm %r6,%r7,24(%r15) /* Load registers. */ 451 + j SYSCALL_ERROR_LABEL 452 + PSEUDO_END (__clone) 453 + 454 + diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/clone.S b/sysdeps/unix/sysv/linux/s390/s390-64/clone.S 455 + index 4eb104be71..c552a6b8de 100644 456 + --- a/sysdeps/unix/sysv/linux/s390/s390-64/clone.S 457 + +++ b/sysdeps/unix/sysv/linux/s390/s390-64/clone.S 458 + @@ -54,6 +54,7 @@ ENTRY(__clone) 459 + br %r14 460 + error: 461 + lghi %r2,-EINVAL 462 + + lmg %r6,%r7,48(%r15) /* Restore registers. */ 463 + jg SYSCALL_ERROR_LABEL 464 + PSEUDO_END (__clone) 465 + 466 + diff --git a/sysdeps/unix/sysv/linux/tst-clone.c b/sysdeps/unix/sysv/linux/tst-clone.c 467 + index 470676ab2b..2bc7124983 100644 468 + --- a/sysdeps/unix/sysv/linux/tst-clone.c 469 + +++ b/sysdeps/unix/sysv/linux/tst-clone.c 470 + @@ -16,12 +16,16 @@ 471 + License along with the GNU C Library; if not, see 472 + <https://www.gnu.org/licenses/>. */ 473 + 474 + -/* BZ #2386 */ 475 + +/* BZ #2386, BZ #31402 */ 476 + #include <errno.h> 477 + #include <stdio.h> 478 + #include <stdlib.h> 479 + #include <unistd.h> 480 + #include <sched.h> 481 + +#include <stackinfo.h> /* For _STACK_GROWS_{UP,DOWN}. */ 482 + +#include <support/check.h> 483 + + 484 + +volatile unsigned v = 0xdeadbeef; 485 + 486 + int child_fn(void *arg) 487 + { 488 + @@ -30,22 +34,67 @@ int child_fn(void *arg) 489 + } 490 + 491 + static int 492 + -do_test (void) 493 + +__attribute__((noinline)) 494 + +do_clone (int (*fn)(void *), void *stack) 495 + { 496 + int result; 497 + + unsigned int a = v; 498 + + unsigned int b = v; 499 + + unsigned int c = v; 500 + + unsigned int d = v; 501 + + unsigned int e = v; 502 + + unsigned int f = v; 503 + + unsigned int g = v; 504 + + unsigned int h = v; 505 + + unsigned int i = v; 506 + + unsigned int j = v; 507 + + unsigned int k = v; 508 + + unsigned int l = v; 509 + + unsigned int m = v; 510 + + unsigned int n = v; 511 + + unsigned int o = v; 512 + + 513 + + result = clone (fn, stack, 0, NULL); 514 + + 515 + + /* Check that clone does not clobber call-saved registers. */ 516 + + TEST_VERIFY (a == v && b == v && c == v && d == v && e == v && f == v 517 + + && g == v && h == v && i == v && j == v && k == v && l == v 518 + + && m == v && n == v && o == v); 519 + + 520 + + return result; 521 + +} 522 + + 523 + +static void 524 + +__attribute__((noinline)) 525 + +do_test_single (int (*fn)(void *), void *stack) 526 + +{ 527 + + printf ("%s (fn=%p, stack=%p)\n", __FUNCTION__, fn, stack); 528 + + errno = 0; 529 + + 530 + + int result = do_clone (fn, stack); 531 + + 532 + + TEST_COMPARE (errno, EINVAL); 533 + + TEST_COMPARE (result, -1); 534 + +} 535 + 536 + - result = clone (child_fn, NULL, 0, NULL); 537 + +static int 538 + +do_test (void) 539 + +{ 540 + + char st[128 * 1024] __attribute__ ((aligned)); 541 + + void *stack = NULL; 542 + +#if _STACK_GROWS_DOWN 543 + + stack = st + sizeof (st); 544 + +#elif _STACK_GROWS_UP 545 + + stack = st; 546 + +#else 547 + +# error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP" 548 + +#endif 549 + 550 + - if (errno != EINVAL || result != -1) 551 + - { 552 + - printf ("FAIL: clone()=%d (wanted -1) errno=%d (wanted %d)\n", 553 + - result, errno, EINVAL); 554 + - return 1; 555 + - } 556 + + do_test_single (child_fn, NULL); 557 + + do_test_single (NULL, stack); 558 + + do_test_single (NULL, NULL); 559 + 560 + - puts ("All OK"); 561 + return 0; 562 + } 563 + 564 + -#define TEST_FUNCTION do_test () 565 + -#include "../test-skeleton.c" 566 + +#include <support/test-driver.c>
+9 -16
pkgs/development/libraries/glibc/common.nix
··· 36 36 , withLinuxHeaders ? false 37 37 , profilingLibraries ? false 38 38 , withGd ? false 39 - , withLibcrypt ? false 40 39 , extraBuildInputs ? [] 41 40 , extraNativeBuildInputs ? [] 42 41 , ... 43 42 } @ args: 44 43 45 44 let 46 - version = "2.38"; 47 - patchSuffix = "-44"; 48 - sha256 = "sha256-+4KZiZiyspllRnvBtp0VLpwwfSzzAcnq+0VVt3DvP9I="; 45 + version = "2.39"; 46 + patchSuffix = "-5"; 47 + sha256 = "sha256-93vUfPgXDFc2Wue/hmlsEYrbOxINMlnGTFAtPcHi2SY="; 49 48 in 50 49 51 50 assert withLinuxHeaders -> linuxHeaders != null; ··· 59 58 patches = 60 59 [ 61 60 /* No tarballs for stable upstream branch, only https://sourceware.org/git/glibc.git and using git would complicate bootstrapping. 62 - $ git fetch --all -p && git checkout origin/release/2.38/master && git describe 63 - glibc-2.38-44-gd37c2b20a4 64 - $ git show --minimal --reverse glibc-2.38.. | gzip -9n --rsyncable - > 2.38-master.patch.gz 61 + $ git fetch --all -p && git checkout origin/release/2.39/master && git describe 62 + glibc-2.39-5-ge0910f1d32 63 + $ git show --minimal --reverse glibc-2.39.. > 2.39-master.patch 65 64 66 65 To compare the archive contents zdiff can be used. 67 - $ zdiff -u 2.38-master.patch.gz ../nixpkgs/pkgs/development/libraries/glibc/2.38-master.patch.gz 66 + $ diff -u 2.39-master.patch ../nixpkgs/pkgs/development/libraries/glibc/2.39-master.patch 68 67 */ 69 - ./2.38-master.patch.gz 68 + ./2.39-master.patch 70 69 71 70 /* Allow NixOS and Nix to handle the locale-archive. */ 72 71 ./nix-locale-archive.patch ··· 96 95 & https://github.com/NixOS/nixpkgs/pull/188492#issuecomment-1233802991 97 96 */ 98 97 ./reenable_DT_HASH.patch 99 - 100 - /* Retrieved from https://salsa.debian.org/glibc-team/glibc/-/commit/662dbc4f9287139a0d9c91df328a5ba6cc6abee1#0f3c6d67cb8cf5bb35c421c20f828fea97b68edf 101 - Qualys advisory: https://www.qualys.com/2024/01/30/qsort.txt 102 - */ 103 - ./local-qsort-memory-corruption.patch 104 98 ] 105 99 /* NVCC does not support ARM intrinsics. Since <math.h> is pulled in by almost 106 100 every HPC piece of software, without this patch CUDA compilation on ARM ··· 177 171 # so the glibc does not depend on its compiler store path 178 172 "libc_cv_as_needed=no" 179 173 ] 180 - ++ lib.optional withGd "--with-gd" 181 - ++ lib.optional withLibcrypt "--enable-crypt"; 174 + ++ lib.optional withGd "--with-gd"; 182 175 183 176 makeFlags = (args.makeFlags or []) ++ [ 184 177 "OBJCOPY=${stdenv.cc.targetPrefix}objcopy"
+1 -2
pkgs/development/libraries/glibc/default.nix
··· 2 2 , withLinuxHeaders ? true 3 3 , profilingLibraries ? false 4 4 , withGd ? false 5 - , withLibcrypt? false 6 5 , pkgsBuildBuild 7 6 , libgcc 8 7 }: ··· 16 15 in 17 16 18 17 (callPackage ./common.nix { inherit stdenv; } { 19 - inherit withLinuxHeaders withGd profilingLibraries withLibcrypt; 18 + inherit withLinuxHeaders withGd profilingLibraries; 20 19 pname = "glibc" + lib.optionalString withGd "-gd" + lib.optionalString (stdenv.cc.isGNU && libgcc==null) "-nolibgcc"; 21 20 }).overrideAttrs(previousAttrs: { 22 21
-14
pkgs/development/libraries/glibc/local-qsort-memory-corruption.patch
··· 1 - diff -rup a/stdlib/qsort.c b/stdlib/qsort.c 2 - --- a/stdlib/qsort.c 2023-07-31 10:54:16.000000000 -0700 3 - +++ b/stdlib/qsort.c 2024-01-15 09:08:25.596167959 -0800 4 - @@ -224,7 +224,8 @@ _quicksort (void *const pbase, size_t to 5 - while ((run_ptr += size) <= end_ptr) 6 - { 7 - tmp_ptr = run_ptr - size; 8 - - while ((*cmp) ((void *) run_ptr, (void *) tmp_ptr, arg) < 0) 9 - + while (tmp_ptr != base_ptr 10 - + && (*cmp) ((void *) run_ptr, (void *) tmp_ptr, arg) < 0) 11 - tmp_ptr -= size; 12 - 13 - tmp_ptr += size; 14 -
+28
pkgs/games/cataclysm-dda/glibc-2.39.diff
··· 1 + diff --git a/src/debug.cpp b/src/debug.cpp 2 + index fa63a3b..1e8f554 100644 3 + --- a/src/debug.cpp 4 + +++ b/src/debug.cpp 5 + @@ -1494,6 +1494,14 @@ std::string game_info::operating_system() 6 + } 7 + 8 + #if !defined(__CYGWIN__) && !defined (__ANDROID__) && ( defined (__linux__) || defined(unix) || defined(__unix__) || defined(__unix) || ( defined(__APPLE__) && defined(__MACH__) ) || defined(BSD) ) // linux; unix; MacOs; BSD 9 + + // 10 + +class FILEDeleter 11 + +{ 12 + + public: 13 + + void operator()( FILE *f ) const noexcept { 14 + + pclose( f ); 15 + + } 16 + +}; 17 + /** Execute a command with the shell by using `popen()`. 18 + * @param command The full command to execute. 19 + * @note The output buffer is limited to 512 characters. 20 + @@ -1504,7 +1512,7 @@ static std::string shell_exec( const std::string &command ) 21 + std::vector<char> buffer( 512 ); 22 + std::string output; 23 + try { 24 + - std::unique_ptr<FILE, decltype( &pclose )> pipe( popen( command.c_str(), "r" ), pclose ); 25 + + std::unique_ptr<FILE, FILEDeleter> pipe( popen( command.c_str(), "r" ) ); 26 + if( pipe ) { 27 + while( fgets( buffer.data(), buffer.size(), pipe.get() ) != nullptr ) { 28 + output += buffer.data();
+3
pkgs/games/cataclysm-dda/stable.nix
··· 43 43 url = "https://sources.debian.org/data/main/c/cataclysm-dda/0.G-4/debian/patches/gcc13-keyword-requires.patch"; 44 44 hash = "sha256-8yvHh0YKC7AC/qzia7AZAfMewMC0RiSepMXpOkMXRd8="; 45 45 }) 46 + # Fix build w/ glibc-2.39 47 + # From https://github.com/BrettDong/Cataclysm-DDA/commit/9b206e2dc969ad79345596e03c3980bd155d2f48 48 + ./glibc-2.39.diff 46 49 ]; 47 50 48 51 makeFlags = common.makeFlags ++ [
+4
pkgs/servers/ldap/389/default.nix
··· 141 141 license = licenses.gpl3Plus; 142 142 platforms = platforms.linux; 143 143 maintainers = [ maintainers.ners ]; 144 + # https://hydra.nixos.org/build/249763145, doesn't build since glibc 2.39. 145 + # Potential fix is documented in https://github.com/389ds/389-ds-base/issues/5332, 146 + # but it doesn't apply here. 147 + broken = true; 144 148 }; 145 149 }