aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2019-11-20 23:21:44 +0100
committer Eric Hameleers <alien@slackware.com>2019-11-20 23:21:44 +0100
commit9616efdbb807c06ba9be6bea3087ef6e39f75c83 (patch)
tree321d3c9d3c38fa1df5775fa28d6951b918a9157a
parent14a88e4ee227c59246f8fea29e2ea38ad6303877 (diff)
downloadliveslak-9616efdbb807c06ba9be6bea3087ef6e39f75c83.tar.gz
liveslak-9616efdbb807c06ba9be6bea3087ef6e39f75c83.tar.xz
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.
Diffstat (limited to '')
-rw-r--r--iso2usb.sh2
-rwxr-xr-xmake_slackware_live.sh2
-rw-r--r--upslak.sh2
3 files changed, 3 insertions, 3 deletions
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..."
diff --git a/make_slackware_live.sh b/make_slackware_live.sh
index ce0e7dd..a4c133d 100755
--- a/make_slackware_live.sh
+++ b/make_slackware_live.sh
@@ -1587,7 +1587,7 @@ if ls ${LIVE_ROOTDIR}/boot/vmlinuz-huge-* 1>/dev/null 2>/dev/null; then
# and move them to a single directory in the ISO:
mkdir -p ${LIVE_ROOTDIR}/usr/share/${LIVEMAIN}
cd ${LIVE_ROOTDIR}/usr/share/${LIVEMAIN}
- uncompressfs ${DEF_SL_PKGROOT}/../isolinux/initrd.img | cpio -i -d -H newc --no-absolute-filenames usr/lib/setup/* sbin/probe sbin/fixdate
+ uncompressfs ${DEF_SL_PKGROOT}/../isolinux/initrd.img | cpio -i -d -m -H newc usr/lib/setup/* sbin/probe sbin/fixdate
mv -i usr/lib/setup/* sbin/probe sbin/fixdate .
rm -r usr sbin
rm -f setup
diff --git a/upslak.sh b/upslak.sh
index c1559df..4af5ae5 100644
--- a/upslak.sh
+++ b/upslak.sh
@@ -411,7 +411,7 @@ extract_initrd() {
cd ${IMGDIR}
uncompressfs ${IMGFILE} \
- | cpio -i -d -H newc --no-absolute-filenames
+ | cpio -i -d -m -H newc
} # End of extract_initrd()
# Modify the extracted initrd and re-pack it: