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

glibc: ldconfig should skip temporary files created by RPM [rhel-9]

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Minor Minor
    • rhel-9.4
    • None
    • glibc
    • None
    • glibc-2.34-90.el9
    • None
    • None
    • rhel-sst-pt-libraries
    • ssg_platform_tools
    • 13
    • 16
    • 1
    • False
    • Hide

      None

      Show
      None
    • Yes
    • Red Hat Enterprise Linux
    • None
    • Bug Fix
    • Hide
      .`ldconfig` no longer crashes after an interrupted system upgrade

      Previously, the `ldconfig` utility terminated unexpectedly with a segmentation fault when processing incomplete shared objects left in the `/usr/lib64` directory after an interrupted system upgrade. With this update, `ldconfig` ignores temporary files written during system upgrades. As a result, `ldconfig` no longer crashes after an interrupted system upgrade.
      Show
      .`ldconfig` no longer crashes after an interrupted system upgrade Previously, the `ldconfig` utility terminated unexpectedly with a segmentation fault when processing incomplete shared objects left in the `/usr/lib64` directory after an interrupted system upgrade. With this update, `ldconfig` ignores temporary files written during system upgrades. As a result, `ldconfig` no longer crashes after an interrupted system upgrade.
    • Done
    • None

      This is a clone of issue RHEL-13720 to use for version rhel-9.4.0

      Original description:

      What were you trying to do that didn't work?

      A customer could not update his system because when updating packages, postinstallation scripts executing ldconfig internally were failing, due to ldconfig crashing while rebuilding its cache.

      It appears that a library file was truncated on the file system, the library still had the "transient" name "libnftables.so.1.0.0;<someid>" as unpacked by cpio.

      IMHO ldconfig should be robust to never crash.

      Please provide the package NVR for which bug is seen:

      glibc-2.28-225.el8.x86_64

      How reproducible:

      Always

      Steps to reproduce

      1. Copy /usr/lib64/libnftables.so.1.0.0 at release nftables-0.9.3-26.el8.x86_64 then truncate the file
        # cp /usr/lib64/libnftables.so.1.0.0 /tmp
        # truncate -s 163840 /tmp/libnftables.so.1.0.0
      2. Execute ldconfig
        # gdb --args ldconfig -n /tmp
        (gdb) run

      Expected results

      No crash

      Actual results

      Program received signal SIGSEGV, Segmentation fault.
      process_elf64_file (lib=<optimized out>, file_length=163840, file_contents=0x7ffff7fc9000, soname=0x7fffffffde78, 
          osversion=0x7fffffffde74, flag=0x7fffffffde70, file_name=0x7fffffffce00 "/tmp/libnftables.so.1.0.0")
          at ../elf/readelflib.c:140
      140		      while (abi_note [0] != 4 || abi_note [1] != 16
      (gdb) bt
      #0  process_elf64_file (lib=<optimized out>, file_length=163840, file_contents=0x7ffff7fc9000, 
          soname=0x7fffffffde78, osversion=0x7fffffffde74, flag=0x7fffffffde70, 
          file_name=0x7fffffffce00 "/tmp/libnftables.so.1.0.0") at ../elf/readelflib.c:140
      #1  process_elf64_file (file_name=0x7fffffffce00 "/tmp/libnftables.so.1.0.0", lib=<optimized out>, 
          flag=0x7fffffffde70, osversion=0x7fffffffde74, soname=0x7fffffffde78, file_contents=0x7ffff7fc9000, 
          file_length=163840) at ../elf/readelflib.c:42
      #2  0x00007ffff7d2884e in process_elf_file (file_name=file_name@entry=0x7fffffffce00 "/tmp/libnftables.so.1.0.0", 
          lib=lib@entry=0x7ffff8011023 "libnftables.so.1.0.0", flag=flag@entry=0x7fffffffde70, 
          osversion=osversion@entry=0x7fffffffde74, soname=soname@entry=0x7fffffffde78, 
          file_contents=file_contents@entry=0x7ffff7fc9000, file_length=163840)
          at ../sysdeps/unix/sysv/linux/i386/readelflib.c:74
      #3  0x00007ffff7d28c30 in process_file (real_file_name=<optimized out>, 
          file_name=0x7fffffffce00 "/tmp/libnftables.so.1.0.0", lib=0x7ffff8011023 "libnftables.so.1.0.0", 
          flag=0x7fffffffde70, osversion=0x7fffffffde74, soname=0x7fffffffde78, is_link=0, stat_buf=0x7fffffffde80)
          at readlib.c:176
      #4  0x00007ffff7d24215 in search_dir (entry=<optimized out>) at ldconfig.c:985
      #5  0x00007ffff7d22ad8 in search_dirs () at ldconfig.c:1176
      #6  main (argc=<optimized out>, argv=0x7fffffffe1c8) at ldconfig.c:1485
      

              fweimer@redhat.com Florian Weimer
              watson-automation Watson Automation
              Florian Weimer Florian Weimer
              Sergey Kolosov Sergey Kolosov
              Jacob Valdez Jacob Valdez (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

                Created:
                Updated:
                Resolved: