Accepting request 920872 from home:jsegitz:branches:systemdhardening:security

Automatic systemd hardening effort by the security team. This has not been tested. For details please see https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort

OBS-URL: https://build.opensuse.org/request/show/920872
OBS-URL: https://build.opensuse.org/package/show/security/haveged?expand=0&rev=142
This commit is contained in:
Peter Simons 2021-11-10 20:37:20 +00:00 committed by Git OBS Bridge
parent 6af202e44e
commit 020d7afb2c
5 changed files with 53 additions and 0 deletions

View File

@ -0,0 +1,17 @@
Index: haveged-1.9.14/contrib/Fedora/haveged.service
===================================================================
--- haveged-1.9.14.orig/contrib/Fedora/haveged.service
+++ haveged-1.9.14/contrib/Fedora/haveged.service
@@ -24,6 +24,12 @@ ProtectKernelLogs=true
ProtectKernelModules=true
RestrictNamespaces=true
RestrictRealtime=true
+# added automatically, for details please see
+# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
+ProtectClock=true
+ProtectKernelTunables=true
+ProtectControlGroups=true
+# end of automatic additions
LockPersonality=true
MemoryDenyWriteExecute=true

View File

@ -8,6 +8,19 @@ JoinsNamespaceOf=haveged.service
[Service]
ExecStart=-/usr/sbin/haveged -c root=/sysroot
PrivateNetwork=yes
# 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
ProtectKernelLogs=true
ProtectControlGroups=true
RestrictRealtime=true
# end of automatic additions
Type=oneshot
StandardInput=null
StandardOutput=null

View File

@ -12,6 +12,15 @@ Mon Oct 11 13:26:52 UTC 2021 - Cristian Rodríguez <crrodriguez@opensuse.org>
initrd modules and udev rules, the other components
are still useful.
-------------------------------------------------------------------
Tue Sep 21 12:15:06 UTC 2021 - Johannes Segitz <jsegitz@suse.com>
- Added hardening to systemd service(s) (bsc#1181400). Added patch(es):
* harden_haveged.service.patch
Modified:
* haveged-switch-root.service
* haveged.service
-------------------------------------------------------------------
Mon Jan 4 08:28:40 UTC 2021 - Paolo Stivanin <info@paolostivanin.com>

View File

@ -12,6 +12,19 @@ Before=sysinit.target shutdown.target systemd-journald.service
ExecStart=/usr/sbin/haveged -w 1024 -v 0 -F
CapabilityBoundingSet=CAP_SYS_ADMIN CAP_SYS_CHROOT
PrivateNetwork=yes
# 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
ProtectKernelLogs=true
ProtectControlGroups=true
RestrictRealtime=true
# end of automatic additions
Restart=always
SuccessExitStatus=137 143

View File

@ -32,6 +32,7 @@ Source5: %{name}-switch-root.service
Patch0: ppc64le.patch
# PATCH-FIX-UPSTREAM: don't write to syslog at startup to avoid deadlocks psimons@suse.com bnc#959237
Patch2: haveged-no-syslog.patch
Patch3: harden_haveged.service.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool