aboutsummaryrefslogtreecommitdiff
path: root/nss/Makefile
diff options
context:
space:
mode:
authorRomain Geissler <romain.geissler@amadeus.com>2023-09-25 01:21:51 +0100
committerSiddhesh Poyarekar <siddhesh@sourceware.org>2023-09-25 01:21:51 +0100
commitec6b95c3303c700eb89eebeda2d7264cc184a796 (patch)
tree807844f0f231ea250d81e0f207369c34e9071d44 /nss/Makefile
parent5d00c201b9a2da768a79ea8d5311f257871c0b43 (diff)
downloadglibc-ec6b95c3303c700eb89eebeda2d7264cc184a796.zip
glibc-ec6b95c3303c700eb89eebeda2d7264cc184a796.tar.gz
glibc-ec6b95c3303c700eb89eebeda2d7264cc184a796.tar.bz2
Fix leak in getaddrinfo introduced by the fix for CVE-2023-4806 [BZ #30843]
This patch fixes a very recently added leak in getaddrinfo. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Diffstat (limited to 'nss/Makefile')
-rw-r--r--nss/Makefile20
1 files changed, 20 insertions, 0 deletions
diff --git a/nss/Makefile b/nss/Makefile
index 8a5126e..668ba34 100644
--- a/nss/Makefile
+++ b/nss/Makefile
@@ -149,6 +149,15 @@ endif
extra-test-objs += nss_test1.os nss_test2.os nss_test_errno.os \
nss_test_gai_hv2_canonname.os
+ifeq ($(run-built-tests),yes)
+ifneq (no,$(PERL))
+tests-special += $(objpfx)mtrace-tst-nss-gai-hv2-canonname.out
+endif
+endif
+
+generated += mtrace-tst-nss-gai-hv2-canonname.out \
+ tst-nss-gai-hv2-canonname.mtrace
+
include ../Rules
ifeq (yes,$(have-selinux))
@@ -217,6 +226,17 @@ endif
$(objpfx)tst-nss-files-alias-leak.out: $(objpfx)/libnss_files.so
$(objpfx)tst-nss-files-alias-truncated.out: $(objpfx)/libnss_files.so
+tst-nss-gai-hv2-canonname-ENV = \
+ MALLOC_TRACE=$(objpfx)tst-nss-gai-hv2-canonname.mtrace \
+ LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
+$(objpfx)mtrace-tst-nss-gai-hv2-canonname.out: \
+ $(objpfx)tst-nss-gai-hv2-canonname.out
+ { test -r $(objpfx)tst-nss-gai-hv2-canonname.mtrace \
+ || ( echo "tst-nss-gai-hv2-canonname.mtrace does not exist"; exit 77; ) \
+ && $(common-objpfx)malloc/mtrace \
+ $(objpfx)tst-nss-gai-hv2-canonname.mtrace; } > $@; \
+ $(evaluate-test)
+
# Disable DT_RUNPATH on NSS tests so that the glibc internal NSS
# functions can load testing NSS modules via DT_RPATH.
LDFLAGS-tst-nss-test1 = -Wl,--disable-new-dtags