nixpkgs/nixos/modules
Martin Weinelt 24adc01e2e
nixos/home-assistant: allow netlink sockets and /proc/net inspection
Since v2021.5.0 home-assistant uses the ifaddr library in the zeroconf
component to enumerate network interfaces via netlink. Since discovery
is all over the place lets allow AF_NETLINK unconditionally.

It also relies on pyroute2 now, which additionally tries to access files
in /proc/net, so we relax ProtectProc a bit by default as well.

This leaves us with these options unsecured:

✗ PrivateNetwork=                                             Service has access to the host's network                                                                 0.5
✗ RestrictAddressFamilies=~AF_(INET|INET6)                    Service may allocate Internet sockets                                                                    0.3
✗ DeviceAllow=                                                Service has a device ACL with some special devices                                                       0.1
✗ IPAddressDeny=                                              Service does not define an IP address allow list                                                         0.2
✗ PrivateDevices=                                             Service potentially has access to hardware devices                                                       0.2
✗ PrivateUsers=                                               Service has access to other users                                                                        0.2
✗ SystemCallFilter=~@resources                                System call allow list defined for service, and @resources is included (e.g. ioprio_set is allowed)      0.2
✗ RestrictAddressFamilies=~AF_NETLINK                         Service may allocate netlink sockets                                                                     0.1
✗ RootDirectory=/RootImage=                                   Service runs within the host's root directory                                                            0.1
✗ SupplementaryGroups=                                        Service runs with supplementary groups                                                                   0.1
✗ RestrictAddressFamilies=~AF_UNIX                            Service may allocate local sockets                                                                       0.1
✗ ProcSubset=                                                 Service has full access to non-process /proc files (/proc subset=)                                       0.1

→ Overall exposure level for home-assistant.service: 1.6 OK 🙂
2021-05-06 16:55:53 +02:00
..
config nixos/users-groups: check format of passwd entries 2021-04-22 13:18:38 +00:00
hardware Merge pull request #119706 from nyanotech/master 2021-04-24 03:49:09 +02:00
i18n/input-method input methods: add kime 2021-04-19 03:05:07 +09:00
installer iso-image: Hide rEFInd from menu in known non-working situations 2021-05-01 19:53:14 -04:00
misc nixos/misc/ids: reclaim uid for disnix 2021-03-28 21:40:44 +02:00
profiles nixos/hidepid: drop the module as the hidepid mount option is broken 2021-02-21 13:51:37 +01:00
programs Merge pull request #120800 from MetaDark/undistract-me 2021-05-03 20:22:04 +01:00
security Merge pull request #116369 from m1cr0man/master 2021-03-23 21:31:42 +01:00
services nixos/home-assistant: allow netlink sockets and /proc/net inspection 2021-05-06 16:55:53 +02:00
system Merge pull request #114637 from KaiHa/pr/fix-systemd-boot-builder 2021-04-25 11:35:00 +01:00
tasks nixos/cpu-freq: fix typo in description 2021-04-21 22:03:18 +02:00
testing treewide: use perl.withPackages when possible 2021-03-31 21:35:37 +02:00
virtualisation Merge pull request #121449 from endgame/metadata-fetcher-umask 2021-05-04 03:39:38 +02:00
module-list.nix Merge pull request #120800 from MetaDark/undistract-me 2021-05-03 20:22:04 +01:00
rename.nix quagga: remove 2021-04-22 12:48:48 +02:00