-
Bug
-
Resolution: Done-Errata
-
Minor
-
rhel-8.8.0
-
None
-
glibc-2.28-243.el8
-
None
-
Moderate
-
rhel-sst-pt-libraries
-
ssg_platform_tools
-
13
-
15
-
1
-
Yes
-
Red Hat Enterprise Linux
-
None
-
Pass
-
None
-
Bug Fix
-
-
Done
-
-
x86_64
-
None
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
- 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
- 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
- is cloned by
-
RHEL-14383 glibc: ldconfig should skip temporary files created by RPM [rhel-9]
- Closed
- links to
-
RHBA-2023:122573 glibc bug fix and enhancement update
- mentioned on