Compare commits

..

No commits in common. "65ee845839f88f535dd05aeb1bf7169e55b2a72f" and "ef1279a66445f33a661c82a1641abaaa66414967" have entirely different histories.

7 changed files with 13 additions and 100 deletions

Binary file not shown.

View File

@ -1,34 +0,0 @@
From 89b61793d80bc2cb2abe47a7d0549466fb087d16 Mon Sep 17 00:00:00 2001
From: Johannes Meixner <jsmeix@suse.com>
Date: Fri, 12 Jan 2024 08:04:40 +0100
Subject: [PATCH] Make initrd accessible only by root (#3123)
Origin: https://github.com/rear/rear/commit/89b61793d80bc2cb2abe47a7d0549466fb087d16
In pack/GNU/Linux/900_create_initramfs.sh call
chmod 0600 "$TMP_DIR/$REAR_INITRD_FILENAME"
to let only 'root' access the ReaR initrd because
the ReaR recovery system in the initrd can contain secrets
(not by default but when certain things are explicitly
configured by the user like SSH keys without passphrase)
see https://github.com/rear/rear/issues/3122
and https://bugzilla.opensuse.org/show_bug.cgi?id=1218728
---
usr/share/rear/pack/GNU/Linux/900_create_initramfs.sh | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/usr/share/rear/pack/GNU/Linux/900_create_initramfs.sh b/usr/share/rear/pack/GNU/Linux/900_create_initramfs.sh
index 1e0c11039..12be718ed 100644
--- a/usr/share/rear/pack/GNU/Linux/900_create_initramfs.sh
+++ b/usr/share/rear/pack/GNU/Linux/900_create_initramfs.sh
@@ -125,4 +125,10 @@ case "$REAR_INITRD_COMPRESSION" in
fi
;;
esac
+
+# 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/$REAR_INITRD_FILENAME" && chmod 0600 "$TMP_DIR/$REAR_INITRD_FILENAME"
+
popd >/dev/null

BIN
rear-2.4.tar.gz Normal file

Binary file not shown.

View File

@ -1,4 +0,0 @@
# cronjob for ReaR
# periodically check if disk layout has changed and update
# the rescue image
30 1 * * * root /usr/sbin/rear checklayout || /usr/sbin/rear mkrescue

View File

@ -1,6 +0,0 @@
[Unit]
Description=Update ReaR rescue image
[Service]
Type=oneshot
ExecStart=/usr/sbin/rear checklayout || /usr/sbin/rear mkrescue

View File

@ -1,24 +1,15 @@
%define debug_package %{nil}
Name: rear
Version: 2.7
Version: 2.4
Release: 3
License: GPLv3
Summary: Relax-and-Recover is a setup-and-forget Linux bare metal disaster recovery solution
URL: http://relax-and-recover.org/
Source0: https://github.com/rear/rear/archive/refs/tags/%{version}.tar.gz
# Add cronjob and systemd timer as documentation
Source1: rear.cron
Source2: rear.service
Source3: rear.timer
Patch0: CVE-2024-23301.patch
ExclusiveArch: x86_64 loongarch64 ppc64le
Source0: https://sourceforge.net/projects/rear/files/rear/%{version}/rear-%{version}.tar.gz
ExclusiveArch: x86_64
Requires: binutils ethtool gzip iputils parted tar openssl gawk attr bc crontabs iproute
Requires: genisoimage util-linux
%ifarch x86_64 i686
Requires: syslinux
%endif
BuildRequires: make asciidoctor
Requires: genisoimage util-linux syslinux
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
%description
@ -38,55 +29,31 @@ if [ $1 -gt 1 ] ; then
fi
%prep
%autosetup -p1
sed -E -e "s:([\"' ])/lib:\1/usr/lib:g" \
-i usr/share/rear/prep/GNU/Linux/*include*.sh
sed -e 's:/lib/:/usr/lib/:g' \
-e 's:/lib\*/:/usr/lib\*/:g' \
-e 's:/usr/usr/lib:/usr/lib:g' \
-i 'usr/share/rear/conf/GNU/Linux.conf'
%autosetup
%build
make doc
%install
%make_install
install -p -d %{buildroot}%{_docdir}/%{name}/
install -m 0644 %{SOURCE1} %{buildroot}%{_docdir}/%{name}/
install -m 0644 %{SOURCE2} %{buildroot}%{_docdir}/%{name}/
install -m 0644 %{SOURCE3} %{buildroot}%{_docdir}/%{name}/
rm -rf %{buildroot}
make install DESTDIR="%{buildroot}"
echo "30 1 * * * root /usr/sbin/rear checklayout || /usr/sbin/rear mkrescue" > rear.cron
install -Dp -m 0644 rear.cron %{buildroot}%{_sysconfdir}/cron.d/rear
%clean
rm -rf %{buildroot}
%files
%doc MAINTAINERS COPYING README.adoc doc/*.txt doc/user-guide/*.html
%doc MAINTAINERS COPYING README.adoc doc/*.txt
%config(noreplace) %{_sysconfdir}/cron.d/rear
%config(noreplace) %{_sysconfdir}/rear/
%doc %{_docdir}/%{name}/rear.*
%config(noreplace) %{_sysconfdir}/rear/cert/
%{_datadir}/rear/
%{_sharedstatedir}/rear/
%{_localstatedir}/lib/rear/
%{_sbindir}/rear
%files help
%doc %{_mandir}/man8/rear.8*
%changelog
* Tue Mar 5 2024 yinxiulin <xiulin.yin@shingroup.cn> - 2.7-3
- Add ppc64le support
* Mon Jan 15 2024 wangkai <13474090681@163.com> - 2.7-2
- Fix CVE-2024-23301
* Thu Jan 04 2024 Paul Thomas <paulthomas100199@gmail.com> - 2.7-1
- update to version 2.7
* Tue Oct 17 2023 yaoxin <yao_xin001@hoperun.com> - 2.6-1
- Upgrade to 2.6
* Tue Nov 15 2022 huajingyun <huajingyun@loongson.cn> - 2.4-4
- Add loongarch64 support
* Wed Feb 26 2020 Ling Yang <lingyang2@huawei.com> - 2.4-3
- Package Init

View File

@ -1,10 +0,0 @@
[Unit]
Description=Update ReaR rescue image
[Timer]
OnCalendar=daily
RandomizedDelaySec=1h
Persistent=true
[Install]
WantedBy=timers.target