@@ -82,7 +82,8 @@ to be explicit about the denied-by-default access rights.
8282 LANDLOCK_ACCESS_NET_BIND_TCP |
8383 LANDLOCK_ACCESS_NET_CONNECT_TCP,
8484 .scoped =
85- LANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET,
85+ LANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET |
86+ LANDLOCK_SCOPE_SIGNAL,
8687 };
8788
8889 Because we may not know on which kernel version an application will be
@@ -123,8 +124,9 @@ version, and only use the available subset of access rights:
123124 ruleset_attr.handled_access_fs &= ~LANDLOCK_ACCESS_FS_IOCTL_DEV;
124125 __attribute__((fallthrough));
125126 case 5:
126- /* Removes LANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET for ABI < 6 */
127- ruleset_attr.scoped &= ~LANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET;
127+ /* Removes LANDLOCK_SCOPE_* for ABI < 6 */
128+ ruleset_attr.scoped &= ~(LANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET |
129+ LANDLOCK_SCOPE_SIGNAL);
128130 }
129131
130132 This enables to create an inclusive ruleset that will contain our rules.
@@ -321,10 +323,15 @@ for a set of actions by specifying it on a ruleset. For example, if a
321323sandboxed process should not be able to :manpage: `connect(2)` to a
322324non-sandboxed process through abstract :manpage: `unix(7)` sockets, we can
323325specify such restriction with ``LANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET ``.
326+ Moreover, if a sandboxed process should not be able to send a signal to a
327+ non-sandboxed process, we can specify this restriction with
328+ ``LANDLOCK_SCOPE_SIGNAL ``.
324329
325330A sandboxed process can connect to a non-sandboxed process when its domain is
326331not scoped. If a process's domain is scoped, it can only connect to sockets
327332created by processes in the same scope.
333+ Moreover, If a process is scoped to send signal to a non-scoped process, it can
334+ only send signals to processes in the same scope.
328335
329336A connected datagram socket behaves like a stream socket when its domain is
330337scoped, meaning if the domain is scoped after the socket is connected , it can
@@ -581,6 +588,13 @@ Starting with the Landlock ABI version 6, it is possible to restrict
581588connections to an abstract :manpage: `unix(7)` socket by setting
582589``LANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET `` to the ``scoped `` ruleset attribute.
583590
591+ Signal scoping (ABI < 6)
592+ ------------------------
593+
594+ Starting with the Landlock ABI version 6, it is possible to restrict
595+ :manpage: `signal(7)` sending by setting ``LANDLOCK_SCOPE_SIGNAL `` to the
596+ ``scoped `` ruleset attribute.
597+
584598.. _kernel_support :
585599
586600Kernel support
0 commit comments