Release of the Glibc 2.35 system library

After six months of development, the release of the GNU C Library (glibc) 2.35 is published, which fully complies with the requirements of the ISO C11 and POSIX.1-2017 standards. The new release includes fixes from 66 developers.

Notable improvements implemented in Glibc 2.35 include:

  • Support has been added for the locale 'C.UTF-8', which includes sorting rules for all Unicode codes, but is limited to the use of ASCII ranges in the functions fnmatch, regexec, and regcomp for space efficiency. The locale occupies about 400 KB, of which 346 KB consists of LC_CTYPE data for Unicode, and requires separate installation (not built into Glibc).
  • Encoding data, character type information, and transliteration tables have been updated to support the Unicode 14.0.0 specification.
  • Functions and macros rounding results to narrower types have been implemented in and : fsqrt, fsqrtl, dsqrtl, ffma, ffmal, dfmal, fMsqrtfN, fMsqrtfNx, fMxsqrtfN, fMxsqrtfNx, fMfmafN, fMfmafNx, fMxfmafN, and fMxfmafNx. The functions are described in the specifications TS 18661-1:2014, TS 18661-3:2015 and added to the draft of the future C standard ISO C2X.
  • Functions and macros for finding the minimum and maximum of floating-point numbers with types float, long double, _FloatN, and _FloatNx have been implemented in and , described in the IEEE 754-2019 specification and added to the draft of the future C standard ISO C2X: fmaximum, fmaximum_num, fmaximum_mag, fmaximum_mag_num, fminimum, fminimum_num, fminimum_mag, and fminimum_mag_num.
  • Constants for single precision floating-point numbers have been added to : M_Ef, M_LOG2Ef, M_LOG10Ef, M_LN2f, M_LN10f, M_PIf, M_PI_2f, M_PI_4f, M_1_PIf, M_2_PIf, M_2_SQRTPIf, M_SQRT2f, and M_SQRT1_2f.
  • For the exp10 functions, corresponding type-agnostic macros have been added to the header file.
  • The macro _PRINTF_NAN_LEN_MAX, proposed in the draft of the ISO C2X standard, has been added to .
  • Format specifiers '%b' and '%B' for outputting integers in binary representation have been added to the printf family of functions.
  • A new sorting algorithm DSO has been implemented in the dynamic linking system, using a depth-first search (DFS) method to address performance issues when handling cyclic dependencies. A parameter glibc.rtld.dynamic_sort has been proposed for selecting the DSO sorting algorithm, which can be set to '1' to revert to the old algorithm.
  • ABI has added support for the new function '__memcmpeq', used by compilers to optimize the use of 'memcmp' when the returned value from this function is solely for checking the operation's completion status.
  • Support for automatic thread registration has been added using the rseq (restartable sequences) system call, introduced in Linux kernel 4.18. The rseq system call allows for the uninterrupted execution of a group of instructions, which is confirmed by the last instruction in the group. Essentially, it provides a means for very fast atomic execution of operations, which, in case of interruption by another thread, are cleared and retried.
  • A symbolic link has been added to /usr/bin/ld.so.
  • By default, all executable files of built-in programs and the test suite are compiled in PIE (position independent executable) mode. The option '--disable-default-pie' is provided to disable this behavior.
  • For Linux, the setting glibc.malloc.hugetlb has been added, allowing the malloc implementation to use the madvise system call with the MADV_HUGEPAGE flag for mmap and sbrk or to directly use large memory pages by specifying the MAP_HUGETLB flag in mmap calls. In the first case, performance can be improved if Transparent Huge Pages are used in madvise mode, while in the second case, it allows for the use of large pages (Huge Pages) reserved by the system.
  • The function _dl_find_object has been added, which can be used for adding information for stack unwinding.
  • Support for the OpenRISC (or1k-linux-gnu) architecture has been added in soft-float mode for floating-point operations. The port requires binutils 2.35, GCC 11, and Linux kernel 5.4.
  • A build flag '--with-rtld-early-cflags' has been added, which allows specifying additional compilation flags used when building the initial code for dynamic linking.
  • For the Linux platform, the function epoll_pwait2 has been added, differing from epoll_wait by specifying the timeout with nanosecond precision.
  • The function posix_spawn_file_actions_addtcsetpgrp_np has been added, eliminating race conditions when setting the controlling terminal for a new process.
  • For applications compiled with Glibc and GCC 12+, a protection mode "_FORTIFY_SOURCE=3" has been implemented, which detects potential buffer overflows during the execution of string functions defined in the header file string.h. The difference from the mode "_FORTIFY_SOURCE=2" lies in the additional checks, which may potentially lead to decreased performance.
  • Support for Intel MPX (Memory Protection Extensions), used for pointer boundary checking in memory areas, has been discontinued (this technology was not widely adopted and has already been removed from GCC and LLVM).
  • The prelink mechanism and its associated environment variables LD_TRACE_PRELINKING and LD_USE_LOAD_BIAS have been declared obsolete and will be removed in the next release.

    Fixed vulnerabilities:

    • CVE-2022-23218, CVE-2022-23219 — buffer overflow in the functions svcunix_create and clnt_create, caused by copying the contents of a parameter named file without checking the size of the copied data. For applications built without stack protection and using the "unix" protocol, the vulnerability may allow an attacker to execute arbitrary code when processing very long file names.
    • CVE-2021-3998 — vulnerability in the realpath() function, caused by returning an incorrect value containing uninitialized residual data from the stack under certain conditions. For the SUID-root program fusermount, this vulnerability can be exploited to obtain confidential information from the process memory, such as pointer information.
    • CVE-2021-3999 — one-byte buffer overflow in the getcwd() function. The issue is caused by a bug present since 1995. To trigger the overflow, it is sufficient to invoke chdir() for the "\/" directory in a separate mount namespace.

    Source: opennet.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster