From 9616efdbb807c06ba9be6bea3087ef6e39f75c83 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Wed, 20 Nov 2019 23:21:44 +0100 Subject: Remove '--no-absolute-filenames' from cpio invocations Since cpio 2.13, this option strips '/' and '../' from symbolic and hard links during extraction of a cpio archive like our initramfs. This is implemented as a fix for CVE-2015-1197 but breaks the initrd. And leaving out this option does not have the adverse effect I always thought it would have... archive extraction is still done into the current directory and not in the filesystem root. --- iso2usb.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'iso2usb.sh') diff --git a/iso2usb.sh b/iso2usb.sh index 21248cb..ed9be53 100644 --- a/iso2usb.sh +++ b/iso2usb.sh @@ -247,7 +247,7 @@ update_initrd() { echo "--- Extracting Slackware initrd and adding rootdelay for USB..." cd ${IMGDIR} uncompressfs ${IMGFILE} \ - | cpio -i -d -H newc --no-absolute-filenames + | cpio -i -d -m -H newc if [ $REFRESH -eq 1 ]; then echo "--- Refreshing Slackware initrd..." -- cgit v1.2.3