diff --git a/fail2ban.changes b/fail2ban.changes index edd0281..07e580b 100644 --- a/fail2ban.changes +++ b/fail2ban.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Sep 14 07:47:32 UTC 2021 - Johannes Segitz + +- Added hardening to systemd service(s) (bsc#1181400). Added patch(es): + * harden_fail2ban.service.patch + ------------------------------------------------------------------- Tue Aug 24 13:40:32 UTC 2021 - Johannes Weberhofer diff --git a/fail2ban.spec b/fail2ban.spec index 9932745..04a7c71 100644 --- a/fail2ban.spec +++ b/fail2ban.spec @@ -51,6 +51,7 @@ Patch201: %{name}-0.10.4-env-script-interpreter.patch Patch300: fail2ban-opensuse-service-sfw.patch # PATCH-FIX-UPSTREAM fail2ban-0.11.2-upstream-patch-for-CVE-2021-32749.patch jweberhofer@weberhofer.at -- fixes CVE-2021-32749 Patch400: fail2ban-0.11.2-upstream-patch-for-CVE-2021-32749.patch +Patch401: harden_fail2ban.service.patch BuildRequires: fdupes BuildRequires: logrotate @@ -137,6 +138,7 @@ sed -i -e 's/^before = paths-.*/before = paths-opensuse.conf/' config/jail.conf %patch300 -p1 %endif %patch400 -p1 +%patch401 -p1 rm config/paths-arch.conf \ config/paths-debian.conf \ diff --git a/harden_fail2ban.service.patch b/harden_fail2ban.service.patch new file mode 100644 index 0000000..1402b50 --- /dev/null +++ b/harden_fail2ban.service.patch @@ -0,0 +1,23 @@ +Index: fail2ban-0.11.2/files/fail2ban.service.in +=================================================================== +--- fail2ban-0.11.2.orig/files/fail2ban.service.in ++++ fail2ban-0.11.2/files/fail2ban.service.in +@@ -5,6 +5,18 @@ After=network.target iptables.service fi + PartOf=firewalld.service ipset.service nftables.service + + [Service] ++# added automatically, for details please see ++# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort ++ProtectSystem=full ++ProtectHome=true ++PrivateDevices=true ++ProtectHostname=true ++ProtectClock=true ++ProtectKernelTunables=true ++ProtectKernelModules=true ++ProtectControlGroups=true ++RestrictRealtime=true ++# end of automatic additions + Type=simple + EnvironmentFile=-/etc/sysconfig/fail2ban + Environment="PYTHONNOUSERSITE=1"