From e54a9f817e67e1e63572cef2ca1af7af6d7cb10b Mon Sep 17 00:00:00 2001 From: Arjun Shankar Date: Tue, 19 Aug 2025 11:50:53 +0200 Subject: [PATCH] inet: Fix namespace pollution in fortification header (RHEL-106206) Resolves: RHEL-106206 --- glibc-RHEL-106206.patch | 34 ++++++++++++++++++++++++++++++++++ glibc.spec | 6 +++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 glibc-RHEL-106206.patch diff --git a/glibc-RHEL-106206.patch b/glibc-RHEL-106206.patch new file mode 100644 index 0000000..d8232fc --- /dev/null +++ b/glibc-RHEL-106206.patch @@ -0,0 +1,34 @@ +commit 87afbd7a1ad9c1dd116921817fa97198171045db +Author: Sam James +Date: Mon Jul 28 21:55:30 2025 +0100 + + inet-fortified: fix namespace violation (bug 33227) + + We need to use __sz, not sz, as we do elsewhere. + + Reviewed-by: Florian Weimer + +diff --git a/inet/bits/inet-fortified.h b/inet/bits/inet-fortified.h +index 8420a4b7fb41086f..5d16b1f871c49e6f 100644 +--- a/inet/bits/inet-fortified.h ++++ b/inet/bits/inet-fortified.h +@@ -38,15 +38,15 @@ __fortify_function int + __NTH (inet_pton (int __af, const char *__restrict __src, + void * __restrict __dst)) + { +- size_t sz = 0; ++ size_t __sz = 0; + if (__af == AF_INET) +- sz = sizeof (struct in_addr); ++ __sz = sizeof (struct in_addr); + else if (__af == AF_INET6) +- sz = sizeof (struct in6_addr); ++ __sz = sizeof (struct in6_addr); + else + return __inet_pton_alias (__af, __src, __dst); + +- return __glibc_fortify (inet_pton, sz, sizeof (char), ++ return __glibc_fortify (inet_pton, __sz, sizeof (char), + __glibc_objsize (__dst), + __af, __src, __dst); + }; diff --git a/glibc.spec b/glibc.spec index 755fc81..ac5f6d4 100644 --- a/glibc.spec +++ b/glibc.spec @@ -157,7 +157,7 @@ end \ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 228%{?dist} +Release: 229%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -1338,6 +1338,7 @@ Patch1022: glibc-RHEL-105965.patch Patch1023: glibc-RHEL-108221.patch Patch1024: glibc-RHEL-104852-1.patch Patch1025: glibc-RHEL-104852-2.patch +Patch1026: glibc-RHEL-106206.patch ############################################################################## # Continued list of core "glibc" package information: @@ -3425,6 +3426,9 @@ update_gconv_modules_cache () %endif %changelog +* Tue Aug 19 2025 Arjun Shankar - 2.34-229 +- inet: Fix namespace pollution in fortification header (RHEL-106206) + * Mon Aug 11 2025 Florian Weimer - 2.34-228 - Handle load segment gaps in _dl_find_object (RHEL-104852)