Skip to content

Commit

Permalink
add missing syscalls for workers (paritytech#2212)
Browse files Browse the repository at this point in the history
# Description

Since the binary split additional syscalls are getting blocked in
relation to the workers.

With the hardened systemd file it shows the following warning:

```
Cannot fully enable landlock, a Linux kernel security feature. Running validation of malicious PVF code has a higher risk of compromising this machine. Consider upgrading the kernel version for maximum security. status=Ok(NotEnforced) abi=1
```

For it to work we need to allow additionally:
- mount
- umount2
- pivot_root

and set `RestrictNamespaces=false`

Added new line `SystemCallFilter=pivot_root` because otherwise it would
get blocked by ~\@\privileged

Co-authored-by: s0me0ne-unkn0wn <[email protected]>
Co-authored-by: Bastian Köcher <[email protected]>
  • Loading branch information
3 people authored and dharjeezy committed Apr 9, 2024
1 parent a3ca09e commit 4e94ea2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions polkadot/scripts/packaging/polkadot.service
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ ProtectKernelTunables=true
ProtectSystem=strict
RemoveIPC=true
RestrictAddressFamilies=AF_INET AF_INET6 AF_NETLINK AF_UNIX
RestrictNamespaces=true
RestrictNamespaces=false
RestrictSUIDSGID=true
SystemCallArchitectures=native
SystemCallFilter=@system-service
SystemCallFilter=landlock_add_rule landlock_create_ruleset landlock_restrict_self seccomp
SystemCallFilter=~@clock @module @mount @reboot @swap @privileged
SystemCallFilter=landlock_add_rule landlock_create_ruleset landlock_restrict_self seccomp mount umount2
SystemCallFilter=~@clock @module @reboot @swap @privileged
SystemCallFilter=pivot_root
UMask=0027

[Install]
Expand Down

0 comments on commit 4e94ea2

Please sign in to comment.