File GRUB_RESCUE_initrd.patch of Package rear118a.32114
--- usr/share/rear/pack/GNU/Linux/90_create_initramfs.sh.orig 2016-09-28 11:29:55.000000000 +0200 +++ usr/share/rear/pack/GNU/Linux/90_create_initramfs.sh 2024-01-16 12:48:23.013692992 +0100 @@ -26,4 +26,10 @@ find . ! -name "*~" |\ cpio -H newc --create --quiet |\ gzip > "$TMP_DIR/initrd.cgz" StopIfError "Could not create initramfs archive" + +# Only root should be allowed to access the initrd +# because the ReaR recovery system can contain secrets +# cf. https://github.com/rear/rear/issues/3122 +test -s "$TMP_DIR/initrd.cgz" && chmod 0600 "$TMP_DIR/initrd.cgz" + popd >&8