]> git.ipfire.org Git - thirdparty/dracut.git/commit
Harden dracut against BASH_ENV environment variable
authorRenaud Métrich <rmetrich@redhat.com>
Thu, 7 Jun 2018 13:42:12 +0000 (15:42 +0200)
committerHarald Hoyer <harald@hoyer.xyz>
Fri, 8 Jun 2018 08:48:45 +0000 (10:48 +0200)
commitc1c78f8a91921fe87f5672cdbdf9791f569fc8ac
tree9723348199412655807e9315d597e2dc84bb70f2
parent935dd5746ab851a3f7e808ef991e681aeee1968a
Harden dracut against BASH_ENV environment variable

When dracut silently produces a broken initramfs, then the system will
likely not boot and this can be very problematic. Typical use case is
after the kernel has been updated.

It appears that dracut is not protected against the BASH_ENV variable,
causing various scripts called by dracut to possibly fail or provide
wrong output (e.g. "ldd" is one of these).
Having a broken output for "ldd" makes the generated initramfs be not
usable, typically because vital binaries will be missing (e.g.
"awk", "udevadm", ...).

Note: because the shebang line cannot contain more than one argument,
the '--norc' option had to be removed. IMHO, it was useless anyway.

Signed-off-by: Renaud Métrich <rmetrich@redhat.com>
dracut.sh