util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC/PATCH] Add hardening settings to uuidd.service
@ 2018-11-12 21:10 Andreas Henriksson
  2018-11-22 10:32 ` Karel Zak
  2018-11-23 11:10 ` [PATCH v2] " Andreas Henriksson
  0 siblings, 2 replies; 5+ messages in thread
From: Andreas Henriksson @ 2018-11-12 21:10 UTC (permalink / raw)
  To: util-linux; +Cc: Andreas Henriksson

This limits what the uuid daemon has access to when it runs.

Further improving this with additional option or making
things even tighter is most likely possible.

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
---
 misc-utils/uuidd.service.in | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/misc-utils/uuidd.service.in b/misc-utils/uuidd.service.in
index 45f1f7334..dd38b645c 100644
--- a/misc-utils/uuidd.service.in
+++ b/misc-utils/uuidd.service.in
@@ -17,8 +17,7 @@ ProtectKernelModules=yes
 ProtectControlGroups=yes
 RestrictAddressFamilies=AF_UNIX
 MemoryDenyWriteExecute=yes
-SystemCallFilter=@default @file-system @basic-io @system-service @signal @io-eve
-nt @network-io
+SystemCallFilter=@default @file-system @basic-io @system-service @signal @io-event @network-io
 
 [Install]
 Also=uuidd.socket
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [RFC/PATCH] Add hardening settings to uuidd.service
  2018-11-12 21:10 [RFC/PATCH] Add hardening settings to uuidd.service Andreas Henriksson
@ 2018-11-22 10:32 ` Karel Zak
  2018-11-22 11:43   ` Andreas Henriksson
  2018-11-23 11:10 ` [PATCH v2] " Andreas Henriksson
  1 sibling, 1 reply; 5+ messages in thread
From: Karel Zak @ 2018-11-22 10:32 UTC (permalink / raw)
  To: Andreas Henriksson; +Cc: util-linux

On Mon, Nov 12, 2018 at 10:10:31PM +0100, Andreas Henriksson wrote:
> diff --git a/misc-utils/uuidd.service.in b/misc-utils/uuidd.service.in
> index 45f1f7334..dd38b645c 100644
> --- a/misc-utils/uuidd.service.in
> +++ b/misc-utils/uuidd.service.in
> @@ -17,8 +17,7 @@ ProtectKernelModules=yes
>  ProtectControlGroups=yes
>  RestrictAddressFamilies=AF_UNIX
>  MemoryDenyWriteExecute=yes
> -SystemCallFilter=@default @file-system @basic-io @system-service @signal @io-eve
> -nt @network-io
> +SystemCallFilter=@default @file-system @basic-io @system-service @signal @io-event @network-io


Not sure, maybe I have miss some another your patch or you forgot to
send any patch, but we have no Protect* and Restrict* setting in the
uuidd.service.in yet. The current upstream is:

 https://github.com/karelzak/util-linux/blob/master/misc-utils/uuidd.service.in

:-)

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFC/PATCH] Add hardening settings to uuidd.service
  2018-11-22 10:32 ` Karel Zak
@ 2018-11-22 11:43   ` Andreas Henriksson
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Henriksson @ 2018-11-22 11:43 UTC (permalink / raw)
  To: Karel Zak; +Cc: util-linux

On Thu, Nov 22, 2018 at 11:32:19AM +0100, Karel Zak wrote:
> Not sure, maybe I have miss some another your patch or you forgot to
> send any patch, [...]

Yeah, I already noticed my screwup here .... Don't have the git tree
available right now but will send a v2 (with the submitted
fixup squashed into previous change) ASAP.

Sorry for not looking properly on what I actually submitted.

Regards,
Andreas Henriksson

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2] Add hardening settings to uuidd.service
  2018-11-12 21:10 [RFC/PATCH] Add hardening settings to uuidd.service Andreas Henriksson
  2018-11-22 10:32 ` Karel Zak
@ 2018-11-23 11:10 ` Andreas Henriksson
  2018-11-29 10:03   ` Karel Zak
  1 sibling, 1 reply; 5+ messages in thread
From: Andreas Henriksson @ 2018-11-23 11:10 UTC (permalink / raw)
  To: util-linux, Karel Zak

This limits what the uuid daemon has access to when it runs.

Further improving this with additional option or making
things even tighter is most likely possible.

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
---
 misc-utils/uuidd.service.in | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/misc-utils/uuidd.service.in b/misc-utils/uuidd.service.in
index 531672765..dd38b645c 100644
--- a/misc-utils/uuidd.service.in
+++ b/misc-utils/uuidd.service.in
@@ -7,6 +7,17 @@ ExecStart=@usrsbin_execdir@/uuidd --socket-activation
 Restart=no
 User=uuidd
 Group=uuidd
+ProtectSystem=strict
+ProtectHome=yes
+PrivateDevices=yes
+PrivateNetwork=yes
+PrivateUsers=yes
+ProtectKernelTunables=yes
+ProtectKernelModules=yes
+ProtectControlGroups=yes
+RestrictAddressFamilies=AF_UNIX
+MemoryDenyWriteExecute=yes
+SystemCallFilter=@default @file-system @basic-io @system-service @signal @io-event @network-io
 
 [Install]
 Also=uuidd.socket
-- 
2.19.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] Add hardening settings to uuidd.service
  2018-11-23 11:10 ` [PATCH v2] " Andreas Henriksson
@ 2018-11-29 10:03   ` Karel Zak
  0 siblings, 0 replies; 5+ messages in thread
From: Karel Zak @ 2018-11-29 10:03 UTC (permalink / raw)
  To: Andreas Henriksson; +Cc: util-linux

On Fri, Nov 23, 2018 at 12:10:59PM +0100, Andreas Henriksson wrote:
>  misc-utils/uuidd.service.in | 11 +++++++++++
>  1 file changed, 11 insertions(+)

Applied, thanks.

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-11-29 10:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-12 21:10 [RFC/PATCH] Add hardening settings to uuidd.service Andreas Henriksson
2018-11-22 10:32 ` Karel Zak
2018-11-22 11:43   ` Andreas Henriksson
2018-11-23 11:10 ` [PATCH v2] " Andreas Henriksson
2018-11-29 10:03   ` Karel Zak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).