Skip to contentSkip to conversation

package/{glibc, localedef}: security bump to version 2.41-143-gfc7a48bc9

Buildroot Applied Peter Korsgaard 2 participants 2 messages Jul 2 – Jul 3

lore
Share & tools
lore
#0 lore raw

Fixes the following vulnerabilities:

GLIBC-SA-2026-0009:
===================
scanf %mc off-by-one heap buffer overflow

Calling the scanf family of functions with a %mc (malloc'd character match) in the GNU C Library version 2.7 to version 2.43 with a format width specifier with an explicit width greater than 1024 could result in a one byte heap buffer overflow.

The bug is in the buffer growth formula in __vfscanf_internal, which under-allocates by one byte during realloc expansion, allowing a controlled single-byte overwrite past the end of the heap buffer.

The impact is limited by the fact that to execute the overwrite you need both user controlled input data and a specific choice of maximum width that yields a smaller than needed allocation. The latter point has to take into account malloc's particular chunk size rounding process. The "%[width]mc" format specifier does not appear to have notable use in major Linux-based OS distributions, due to which the real world impact may be limited to bespoke use cases.

CVE-Id: CVE-2026-5450

GLIBC-SA-2026-0010:
===================
Potential buffer under-read in ungetwc

Calling the ungetwc function on a FILE stream with wide characters encoded in a character set that has overlaps between its single byte and multi-byte character encodings, in the GNU C Library version 2.43 or earlier, may result in an attempt to read bytes before an allocated buffer, potentially resulting in unintentional disclosure of neighboring data in the heap, or a program crash.

A bug in the wide character pushback implementation (_IO_wdefault_pbackfail in libio/wgenops.c) causes ungetwc() to operate on the regular character buffer (fp->_IO_read_ptr) instead of the actual wide-stream read pointer (fp->_wide_data->_IO_read_ptr). The program crash may happen in cases where fp->_IO_read_ptr is not initialized and hence points to NULL. The buffer under-read requires a special situation where the input character encoding is such that there are overlaps between single byte representations and multibyte representations in that encoding, resulting in spurious matches. The spurious match case is not possible in the standard Unicode character sets.

CVE-Id: CVE-2026-5928

https://inbox.sourceware.org/libc-announce/[email protected]/T/

git shortlog b676adadbc1f5fb2f31bc484a7628cca89ae6f22.. DJ Delorie (1):
stdio-common: Allow partially-filled %mc buffers [BZ #12701]

Florian Weimer (1):
iconv: Suppress intermediate errors with //TRANSLIT (bug 34236)

Maciej W. Rozycki (2):
support: Implement 'xfmemopen' for seamless 'fmemopen' use
stdio-common: Reject insufficient character data in scanf [BZ #12701]

Rocket Ma (2):
libio: Fix ungetwc operating on byte stream [BZ #33998]
stdio-common: Fix buffer overflow in scanf %mc [BZ #34008]

---
 package/glibc/glibc.hash       | 2 +-
 package/glibc/glibc.mk         | 8 +++++++-
 package/localedef/localedef.mk | 2 +-
 3 files changed, 9 insertions(+), 3 deletions(-)
package/glibc/glibc.hash +1 -1
index 3f1df7058a..03e8722057 100644
@@ -1,5 +1,5 @@
 # Locally calculated (fetched from git)
-sha256  c5856a16a8576d35adddd92f7e86c58faeedd849633582a7926f9a3e766ffe2d  glibc-2.41-137-gb676adadbc1f5fb2f31bc484a7628cca89ae6f22-git4.tar.gz
+sha256  130d77e16a08f7e52e14b49d8554997877a4fe82ac6b840a0202716146ac8fb5  glibc-2.41-143-gfc7a48bc9e999c0f9a1f9fa1b209eac1d6a93363-git4.tar.gz
 
 # Hashes for license files
 sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  COPYING
package/glibc/glibc.mk +7 -1
index 3ce6265a6d..8121968e02 100644
@@ -7,7 +7,7 @@
 # Generate version string using:
 #   git describe --match 'glibc-*' --abbrev=40 origin/release/MAJOR.MINOR/master | cut -d '-' -f 2-
 # When updating the version, please also update localedef
-GLIBC_VERSION = 2.41-137-gb676adadbc1f5fb2f31bc484a7628cca89ae6f22
+GLIBC_VERSION = 2.41-143-gfc7a48bc9e999c0f9a1f9fa1b209eac1d6a93363
 GLIBC_SITE = https://sourceware.org/git/glibc.git
 GLIBC_SITE_METHOD = git
 
@@ -60,6 +60,12 @@ GLIBC_IGNORE_CVES += CVE-2026-4438
 # Fixed by glibc-2.41-135-g61737f43b1f0d9f64a6f16649625476b70f9f4d3
 GLIBC_IGNORE_CVES += CVE-2026-4046
 
+# Fixed by glibc-2.41-138-g8941538b92a574a24e9308e164869239d2b0d845
+GLIBC_IGNORE_CVES += CVE-2026-5928
+
+# Fixed by glibc-2.41-142-g1a74f82eedaf0987eda1f522121e6a48fac502e7
+GLIBC_IGNORE_CVES += CVE-2026-5450
+
 # glibc is part of the toolchain so disable the toolchain dependency
 GLIBC_ADD_TOOLCHAIN_DEPENDENCY = NO
 
package/localedef/localedef.mk +1 -1
index c3a959c5f5..7b16932125 100644
@@ -7,7 +7,7 @@
 # Use the same VERSION and SITE as target glibc
 # As in glibc.mk, generate version string using:
 #   git describe --match 'glibc-*' --abbrev=40 origin/release/MAJOR.MINOR/master | cut -d '-' -f 2-
-LOCALEDEF_VERSION = 2.41-137-gb676adadbc1f5fb2f31bc484a7628cca89ae6f22
+LOCALEDEF_VERSION = 2.41-143-gfc7a48bc9e999c0f9a1f9fa1b209eac1d6a93363
 LOCALEDEF_SOURCE = glibc-$(LOCALEDEF_VERSION)$(BR_FMT_VERSION_git).tar.gz
 LOCALEDEF_SITE = https://sourceware.org/git/glibc.git
 LOCALEDEF_SITE_METHOD = git
Signature · 6 lines
2.47.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

In reply of:

Quoted 62 lines

Fixes the following vulnerabilities:

GLIBC-SA-2026-0009:
===================
scanf %mc off-by-one heap buffer overflow

Calling the scanf family of functions with a %mc (malloc'd character match) in the GNU C Library version 2.7 to version 2.43 with a format width specifier with an explicit width greater than 1024 could result in a one byte heap buffer overflow.

The bug is in the buffer growth formula in __vfscanf_internal, which under-allocates by one byte during realloc expansion, allowing a controlled single-byte overwrite past the end of the heap buffer.

The impact is limited by the fact that to execute the overwrite you need both user controlled input data and a specific choice of maximum width that yields a smaller than needed allocation. The latter point has to take into account malloc's particular chunk size rounding process. The "%[width]mc" format specifier does not appear to have notable use in major Linux-based OS distributions, due to which the real world impact may be limited to bespoke use cases.

CVE-Id: CVE-2026-5450

GLIBC-SA-2026-0010:
===================
Potential buffer under-read in ungetwc

Calling the ungetwc function on a FILE stream with wide characters encoded in a character set that has overlaps between its single byte and multi-byte character encodings, in the GNU C Library version 2.43 or earlier, may result in an attempt to read bytes before an allocated buffer, potentially resulting in unintentional disclosure of neighboring data in the heap, or a program crash.

A bug in the wide character pushback implementation (_IO_wdefault_pbackfail in libio/wgenops.c) causes ungetwc() to operate on the regular character buffer (fp->_IO_read_ptr) instead of the actual wide-stream read pointer (fp->_wide_data->_IO_read_ptr). The program crash may happen in cases where fp->_IO_read_ptr is not initialized and hence points to NULL. The buffer under-read requires a special situation where the input character encoding is such that there are overlaps between single byte representations and multibyte representations in that encoding, resulting in spurious matches. The spurious match case is not possible in the standard Unicode character sets.

CVE-Id: CVE-2026-5928

https://inbox.sourceware.org/libc-announce/[email protected]/T/

git shortlog b676adadbc1f5fb2f31bc484a7628cca89ae6f22.. DJ Delorie (1):
stdio-common: Allow partially-filled %mc buffers [BZ #12701]

Florian Weimer (1):
iconv: Suppress intermediate errors with //TRANSLIT (bug 34236)

Maciej W. Rozycki (2):
support: Implement 'xfmemopen' for seamless 'fmemopen' use
stdio-common: Reject insufficient character data in scanf [BZ #12701]

Quoted 5 lines

Rocket Ma (2):
libio: Fix ungetwc operating on byte stream [BZ #33998]
stdio-common: Fix buffer overflow in scanf %mc [BZ #34008]

Applied to 2025.02.x. Thanks

Quoted 63 lines
---
 package/glibc/glibc.hash       | 2 +-
 package/glibc/glibc.mk         | 8 +++++++-
 package/localedef/localedef.mk | 2 +-
 3 files changed, 9 insertions(+), 3 deletions(-)
package/glibc/glibc.hash +1 -1
index 3f1df7058a..03e8722057 100644
@@ -1,5 +1,5 @@
 # Locally calculated (fetched from git)
-sha256  c5856a16a8576d35adddd92f7e86c58faeedd849633582a7926f9a3e766ffe2d  glibc-2.41-137-gb676adadbc1f5fb2f31bc484a7628cca89ae6f22-git4.tar.gz
+sha256  130d77e16a08f7e52e14b49d8554997877a4fe82ac6b840a0202716146ac8fb5  glibc-2.41-143-gfc7a48bc9e999c0f9a1f9fa1b209eac1d6a93363-git4.tar.gz
 
 # Hashes for license files
 sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  COPYING
package/glibc/glibc.mk +7 -1
index 3ce6265a6d..8121968e02 100644
@@ -7,7 +7,7 @@
 # Generate version string using:
 #   git describe --match 'glibc-*' --abbrev=40 origin/release/MAJOR.MINOR/master | cut -d '-' -f 2-
 # When updating the version, please also update localedef
-GLIBC_VERSION = 2.41-137-gb676adadbc1f5fb2f31bc484a7628cca89ae6f22
+GLIBC_VERSION = 2.41-143-gfc7a48bc9e999c0f9a1f9fa1b209eac1d6a93363
 GLIBC_SITE = https://sourceware.org/git/glibc.git
 GLIBC_SITE_METHOD = git
 
@@ -60,6 +60,12 @@ GLIBC_IGNORE_CVES += CVE-2026-4438
 # Fixed by glibc-2.41-135-g61737f43b1f0d9f64a6f16649625476b70f9f4d3
 GLIBC_IGNORE_CVES += CVE-2026-4046
 
+# Fixed by glibc-2.41-138-g8941538b92a574a24e9308e164869239d2b0d845
+GLIBC_IGNORE_CVES += CVE-2026-5928
+
+# Fixed by glibc-2.41-142-g1a74f82eedaf0987eda1f522121e6a48fac502e7
+GLIBC_IGNORE_CVES += CVE-2026-5450
+
 # glibc is part of the toolchain so disable the toolchain dependency
 GLIBC_ADD_TOOLCHAIN_DEPENDENCY = NO
 
package/localedef/localedef.mk +1 -1
index c3a959c5f5..7b16932125 100644
@@ -7,7 +7,7 @@
 # Use the same VERSION and SITE as target glibc
 # As in glibc.mk, generate version string using:
 #   git describe --match 'glibc-*' --abbrev=40 origin/release/MAJOR.MINOR/master | cut -d '-' -f 2-
-LOCALEDEF_VERSION = 2.41-137-gb676adadbc1f5fb2f31bc484a7628cca89ae6f22
+LOCALEDEF_VERSION = 2.41-143-gfc7a48bc9e999c0f9a1f9fa1b209eac1d6a93363
 LOCALEDEF_SOURCE = glibc-$(LOCALEDEF_VERSION)$(BR_FMT_VERSION_git).tar.gz
 LOCALEDEF_SITE = https://sourceware.org/git/glibc.git
 LOCALEDEF_SITE_METHOD = git
Signature · 6 lines
2.47.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot