You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having an issue with some changes introduced with #445, more specifically this part of commit c9e314c. It sets both /sys and /proc as read-only for systemd-networkd.service. This was later refactored in 5061186 by #779.
NetworkD supports setting sysctl options on interfaces, like with IPv6AcceptRA=yes|no which translates to net.ipv6.conf.all.accept_ra being set accordingly. However, having /proc mounted as read-only prevents NetworkD from performing these changes, with the following warning:
I'd like to question the validity of /proc being read-only here. The SystemD container interface recommends mounting /sys and /proc/sys as read-only for added security, but to leave /proc/sys/net read-write if the network stack is namespaced (for LXC/Incus containers, I wonder if /proc/sys could be left read-write entirely). Here, preventing NetworkD from editing sysctl options breaks functionality.
Guessing from the comment above fix_ro_paths, it seems to me the intention was to prevent systemd-udevd.service from running by having /sys mounted as read-only (leveraging the ConditionPathIsReadWrite=/sys check). However, since fix_ro_paths is not called with systemd-udevd.service, this won't work, so I may be missing something here.
Is there any reason to have /proc in the list of restricted paths here?
Thanks!
The text was updated successfully, but these errors were encountered:
Hey there!
I'm having an issue with some changes introduced with #445, more specifically this part of commit c9e314c. It sets both
/sys
and/proc
as read-only forsystemd-networkd.service
. This was later refactored in 5061186 by #779.This issue is present (in my case) with the latest archlinux container image from https://images.linuxcontainers.org.
NetworkD supports setting
sysctl
options on interfaces, like withIPv6AcceptRA=yes|no
which translates tonet.ipv6.conf.all.accept_ra
being set accordingly. However, having/proc
mounted as read-only prevents NetworkD from performing these changes, with the following warning:This is just an example, but there is actually a great deal of those.
I'd like to question the validity of
/proc
being read-only here. The SystemD container interface recommends mounting/sys
and/proc/sys
as read-only for added security, but to leave/proc/sys/net
read-write if the network stack is namespaced (for LXC/Incus containers, I wonder if/proc/sys
could be left read-write entirely). Here, preventing NetworkD from editingsysctl
options breaks functionality.Guessing from the comment above
fix_ro_paths
, it seems to me the intention was to preventsystemd-udevd.service
from running by having/sys
mounted as read-only (leveraging theConditionPathIsReadWrite=/sys
check). However, sincefix_ro_paths
is not called withsystemd-udevd.service
, this won't work, so I may be missing something here.Is there any reason to have
/proc
in the list of restricted paths here?Thanks!
The text was updated successfully, but these errors were encountered: