Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-67692

glibc: Provide thread-safe getenv [rhel-9]

    • glibc-2.34-147.el9
    • No
    • Moderate
    • ZStream, Patch
    • Hide
      4f20a1dc5242fb4bb8763e0451df898fa48e740c
      a6ccce23afc2a09a17ac2a86a2b726b58df609df
      9401024e5e6be0e1c3870e185daae865cd4501f4
      7a61e7f557a97ab597d6fca5e2d1f13f65685c61
      Show
      4f20a1dc5242fb4bb8763e0451df898fa48e740c a6ccce23afc2a09a17ac2a86a2b726b58df609df 9401024e5e6be0e1c3870e185daae865cd4501f4 7a61e7f557a97ab597d6fca5e2d1f13f65685c61
    • rhel-sst-pt-libraries
    • ssg_platform_tools
    • 2
    • False
    • Hide

      None

      Show
      None
    • Yes
    • None
    • Approved Blocker
    • Bug Fix
    • Hide
      .The `glibc` `getenv` function provides a limited form of thread safety

        The `glibc` `getenv` function is not thread safe. Previously, if an application still called the functions `getenv`, `setenv`, `unsetenv`, `putenv`, and `clearenv` at the same time, the application they could terminate unexpectedly or `getenv` could return incorrect values. With this bug fix, the `getenv` function provides a limited form of thread safety. As a result, applications no longer crash if they call the functions concurrently. Additionally, `getenv` returns only environment values that have been using `setenv` or which were present at the start of the program, and reports previously-set environment variables as unset only if there has been a potentially unordered `unsetenv` call.

      This fix is not applicable if you directly modify the `environ` array.
      Show
      .The `glibc` `getenv` function provides a limited form of thread safety   The `glibc` `getenv` function is not thread safe. Previously, if an application still called the functions `getenv`, `setenv`, `unsetenv`, `putenv`, and `clearenv` at the same time, the application they could terminate unexpectedly or `getenv` could return incorrect values. With this bug fix, the `getenv` function provides a limited form of thread safety. As a result, applications no longer crash if they call the functions concurrently. Additionally, `getenv` returns only environment values that have been using `setenv` or which were present at the start of the program, and reports previously-set environment variables as unset only if there has been a potentially unordered `unsetenv` call. This fix is not applicable if you directly modify the `environ` array.
    • Done
    • None

      The customer ran into crashes caused by the non-thread-safety of getenv and setenv. The customer has an internal code that they cannot share but the details are exactly the ones from these links:

      https://sourceware.org/bugzilla/show_bug.cgi?id=15607

      https://patchwork.sourceware.org/project/glibc/list/?series=36745

      RHEL 10 Beta:   https://issues.redhat.com/browse/RHEL-42410

      The customer is considering upgrading to RHEL 9.4 soon, so they are requesting that the fix be backported to RHEL 9.x as well. Please check the Jira below, which is currently present for RHEL 10 Beta.

      LINK:  https://issues.redhat.com/browse/RHEL-42410

       

      Please let me know if you need any data/information about the same.

              skolosov@redhat.com Sergey Kolosov
              rhn-support-vrajput Virendrasingh Rajput
              Platform Tools - Libraries Bot Platform Tools - Libraries Bot
              qe-baseos-tools-bugs@redhat.com qe-baseos-tools-bugs@redhat.com qe-baseos-tools-bugs@redhat.com qe-baseos-tools-bugs@redhat.com
              Marc Muehlfeld Marc Muehlfeld
              Votes:
              0 Vote for this issue
              Watchers:
              14 Start watching this issue

                Created:
                Updated: