RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1884149 - dracut generates broken initramfs images when /etc/ld.so.preload contains a non-existing library
Summary: dracut generates broken initramfs images when /etc/ld.so.preload contains a n...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: dracut
Version: 8.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: 8.0
Assignee: Lukáš Nykrýn
QA Contact: Frantisek Sumsal
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-10-01 07:54 UTC by Renaud Métrich
Modified: 2023-12-15 19:37 UTC (History)
3 users (show)

Fixed In Version: dracut-049-129.git20210107.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-18 15:02:47 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github dracutdevs dracut pull 936 0 None closed dracut-install: ignore bogus preload libs 2021-02-09 16:22:41 UTC

Description Renaud Métrich 2020-10-01 07:54:16 UTC
This bug was initially created as a copy of Bug #1884147

I am copying this bug because: 

Also applies to RHEL 8.


Description of problem:

When specifying a non-existing library in /etc/ld.so.preload, dracut generates a broken initramfs image, containing everything except a few binaries which are symlinks to other binaries, e.g.:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
lrwxrwxrwx   1 root     root            4 Feb 28  2020 usr/bin/awk -> gawk
lrwxrwxrwx   1 root     root           16 Feb 28  2020 usr/sbin/halt -> ../bin/systemctl
lrwxrwxrwx   1 root     root           11 Feb 28  2020 usr/sbin/ping -> ../bin/ping
lrwxrwxrwx   1 root     root           14 Feb 28  2020 usr/sbin/udevadm -> ../bin/udevadm
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

This prevents the system from booting.


Version-Release number of selected component (if applicable):

dracut from RHEL 7 and RHEL 8


How reproducible:

Always


Steps to Reproduce:
1. Create /etc/ld.so.preload with a non-existing library

  # echo "/lib64/libfoo.so" > /etc/ld.so.preload

2. Build the initramfs

  # dracut /tmp/initramfs.img $(uname -r)

3. Compare with the good one in /boot

  # diff -u /tmp/initramfs.img $(uname -r).img /boot/initramfs-$(uname -r).img

Actual results:

-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
+lrwxrwxrwx   1 root     root            4 Feb 28  2020 usr/bin/awk -> gawk
+lrwxrwxrwx   1 root     root           16 Feb 28  2020 usr/sbin/halt -> ../bin/systemctl
+lrwxrwxrwx   1 root     root           11 Feb 28  2020 usr/sbin/ping -> ../bin/ping
+lrwxrwxrwx   1 root     root           14 Feb 28  2020 usr/sbin/udevadm -> ../bin/udevadm
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

Output may vary.


Expected results:

All files included and symlinks created

Additional info:

Running dracut in debug shows "dracut-install" is failing but reporting success anyway:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
dracut-install: Handle 'ping'
dracut-install: find_binary(ping) == /usr/sbin/ping
dracut-install: find_binary(ping) == /usr/bin/ping
dracut-install: dracut_install '/usr/sbin/ping'
dracut-install: dracut_install('/usr/sbin/ping', '/usr/sbin/ping')
dracut-install: dracut_install('/usr/bin/ping', '/usr/bin/ping')
ERROR: ld.so: object '/lib64/libfoo.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
dracut-install: ldd: 'ERROR: ld.so: object '/lib64/libfoo.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
dracut-install: '
dracut-install: dracut_install('/lib64/libfoo.so'', '/lib64/libfoo.so'')
...
dracut-install: cp '/usr/bin/ping' '/var/tmp/dracut.yEP3o0/initramfs/usr/bin/ping'
dracut-install: dracut_install ret = 2
dracut-install: '/usr/bin/ping' install error
dracut-install: dracut_install '/usr/bin/ping'
dracut-install: dracut_install('/usr/bin/ping', '/usr/bin/ping')
dracut-install: hash hit items for '/usr/bin/ping'
dracut-install: dracut_install '/usr/bin/ping' OK
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

Comment 7 errata-xmlrpc 2021-05-18 15:02:47 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (dracut bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:1661


Note You need to log in before you can comment on or make changes to this bug.