Tahera Fahimi
54a6e6bbf3
landlock: Add signal scoping
...
Currently, a sandbox process is not restricted to sending a signal (e.g.
SIGKILL) to a process outside the sandbox environment. The ability to
send a signal for a sandboxed process should be scoped the same way
abstract UNIX sockets are scoped. Therefore, we extend the "scoped"
field in a ruleset with LANDLOCK_SCOPE_SIGNAL to specify that a ruleset
will deny sending any signal from within a sandbox process to its parent
(i.e. any parent sandbox or non-sandboxed processes).
This patch adds file_set_fowner and file_free_security hooks to set and
release a pointer to the file owner's domain. This pointer, fown_domain
in landlock_file_security will be used in file_send_sigiotask to check
if the process can send a signal.
The ruleset_with_unknown_scope test is updated to support
LANDLOCK_SCOPE_SIGNAL.
This depends on two new changes:
- commit 1934b21261 ("file: reclaim 24 bytes from f_owner"): replace
container_of(fown, struct file, f_owner) with fown->file .
- commit 26f204380a ("fs: Fix file_set_fowner LSM hook
inconsistencies"): lock before calling the hook.
Signed-off-by: Tahera Fahimi <fahimitahera@gmail.com >
Closes: https://github.com/landlock-lsm/linux/issues/8
Link: https://lore.kernel.org/r/df2b4f880a2ed3042992689a793ea0951f6798a5.1725657727.git.fahimitahera@gmail.com
[mic: Update landlock_get_current_domain()'s return type, improve and
fix locking in hook_file_set_fowner(), simplify and fix sleepable call
and locking issue in hook_file_send_sigiotask() and rebase on the latest
VFS tree, simplify hook_task_kill() and quickly return when not
sandboxed, improve comments, rename LANDLOCK_SCOPED_SIGNAL]
Co-developed-by: Mickaël Salaün <mic@digikod.net >
Signed-off-by: Mickaël Salaün <mic@digikod.net >
2024-09-16 23:50:52 +02:00
..
2023-12-15 17:06:45 +01:00
2021-12-21 15:09:46 -08:00
2020-07-15 20:34:11 -07:00
2024-06-20 11:52:56 +02:00
2021-09-13 14:51:10 -05:00
2024-04-15 13:42:38 +02:00
2022-11-17 22:49:39 +01:00
2024-06-30 11:29:17 +01:00
2024-07-12 10:11:43 +02:00
2021-01-25 18:44:44 +01:00
2022-06-28 21:26:05 +02:00
2024-09-03 18:19:40 +02:00
2022-06-28 21:26:05 +02:00
2023-08-22 15:13:20 +02:00
2022-06-28 21:26:05 +02:00
2022-08-09 19:51:05 +02:00
2023-04-27 18:49:24 -04:00
2023-12-19 10:37:50 -08:00
2023-10-02 20:48:16 +02:00
2023-05-30 15:20:08 +01:00
2021-06-16 17:47:53 +02:00
2024-02-19 10:58:24 +00:00
2024-02-17 17:00:09 +01:00
2022-04-29 14:38:03 -07:00
2022-11-23 19:55:22 +01:00
2023-06-20 14:28:17 -06:00
2022-05-13 10:56:10 +02:00
2021-11-01 13:36:08 +00:00
2022-11-04 16:56:41 +01:00
2022-08-11 10:31:19 -07:00
2022-12-22 18:18:37 -08:00
2023-03-10 21:05:16 +01:00
2020-07-13 17:01:44 -07:00
2024-08-20 14:02:22 -04:00
2023-05-30 16:42:00 -07:00
2024-08-30 08:22:36 +02:00
2024-02-16 12:42:59 +11:00
2023-11-14 08:16:34 +01:00
2021-02-06 09:22:10 +01:00
2021-02-15 18:28:30 +01:00
2024-02-08 08:41:03 -05:00
2024-09-11 10:45:28 -06:00
2021-04-02 11:18:30 -06:00
2023-07-24 20:11:54 -06:00
2024-08-08 16:52:43 -07:00
2022-06-07 10:20:42 -07:00
2024-07-11 15:33:28 +02:00
2024-03-05 17:13:24 +01:00
2022-05-18 00:11:18 +08:00
2024-02-13 11:47:13 +01:00
2023-06-06 17:05:54 -04:00
2021-01-12 17:31:14 +01:00
2022-05-15 18:31:28 -06:00
2022-09-24 08:50:04 +02:00
2022-09-24 08:50:04 +02:00
2020-10-29 18:39:43 -07:00
2023-07-14 08:43:49 -10:00
2020-12-04 12:06:15 +01:00
2024-05-24 10:36:55 +01:00
2021-11-26 16:48:59 +01:00
2022-06-28 21:26:05 +02:00
2023-04-18 16:39:34 -07:00
2020-09-17 18:46:04 +02:00
2023-10-16 11:38:56 -04:00
2024-04-02 10:49:38 +08:00
2024-04-30 08:48:10 -07:00
2022-01-26 14:49:46 +01:00
2022-06-28 21:26:05 +02:00
2023-01-20 09:33:22 +00:00
2024-04-08 14:10:45 +01:00
2021-10-18 12:28:53 -07:00
2023-07-20 17:24:57 -05:00
2024-06-11 12:57:49 -05:00
2023-03-06 15:49:07 -06:00
2023-03-30 15:57:50 -04:00
2022-06-28 21:26:05 +02:00
2022-06-20 18:21:25 +02:00
2024-06-05 14:52:15 +05:30
2024-08-26 19:21:14 -07:00
2021-03-18 17:03:54 +01:00
2022-08-29 15:32:13 +02:00
2022-06-03 20:09:27 +08:00
2023-08-23 14:17:42 -07:00
2024-09-04 12:54:05 +01:00
2020-07-19 19:20:22 -07:00
2024-08-26 09:33:58 -07:00
2024-08-23 13:04:34 +01:00
2023-06-15 14:55:15 +02:00
2024-02-14 11:01:01 +00:00
2023-04-19 23:39:42 -04:00
2022-11-28 12:46:23 -08:00
2024-08-28 16:53:57 +02:00
2024-03-06 13:13:05 +01:00
2024-01-27 18:08:54 -08:00
2024-09-05 11:39:17 +02:00
2021-04-20 08:59:03 -06:00
2024-09-13 21:15:44 -07:00
2022-06-28 21:26:05 +02:00
2023-06-06 07:54:00 +09:00
2023-03-16 21:20:32 -07:00
2020-07-06 21:37:08 -07:00
2024-07-21 17:15:46 -07:00
2023-09-25 22:34:33 -07:00
2023-08-09 15:43:27 +09:30
2021-01-27 15:13:52 +01:00
2022-02-17 09:09:37 +01:00
2021-02-07 14:51:19 -08:00
2024-03-06 09:56:35 +01:00
2023-09-21 19:22:05 +02:00
2022-08-10 13:49:50 +01:00
2021-02-08 13:01:24 +01:00
2024-02-15 08:44:57 +01:00
2023-10-27 09:21:13 +02:00
2024-05-07 01:35:57 +02:00
2023-05-24 22:05:24 -07:00
2023-10-27 18:04:30 +08:00
2022-09-20 11:53:32 +01:00
2020-11-27 15:48:31 +01:00
2020-07-27 12:20:40 -07:00
2023-03-10 21:05:16 +01:00
2022-02-18 13:08:18 +00:00
2021-11-15 07:53:10 -08:00
2021-11-15 07:53:10 -08:00
2021-06-03 15:31:34 -07:00
2024-05-06 11:13:56 +02:00
2023-10-04 13:00:34 +05:30
2022-02-18 21:20:06 -08:00
2022-10-28 12:36:34 +08:00
2022-06-28 21:26:05 +02:00
2021-07-29 15:06:50 +01:00
2021-05-07 00:26:34 -07:00
2023-12-20 11:27:20 +00:00
2022-09-15 09:08:09 +02:00
2021-03-10 12:45:16 -08:00
2024-05-07 01:35:57 +02:00
2022-08-18 20:37:35 -07:00
2024-08-26 09:37:22 -07:00
2020-08-22 12:44:37 -07:00
2022-06-28 21:26:05 +02:00
2024-04-02 18:24:33 -07:00
2022-12-12 09:29:56 +00:00
2024-04-01 10:49:28 +01:00
2024-07-25 11:57:27 +02:00
2022-06-28 21:26:05 +02:00
2024-02-27 18:22:49 -08:00
2024-09-04 16:40:33 -07:00
2024-08-26 09:37:23 -07:00
2024-08-26 09:37:23 -07:00
2024-03-06 13:13:00 +01:00
2024-06-07 11:08:07 +02:00
2022-07-17 07:52:46 -07:00
2024-09-12 10:14:15 -06:00
2024-02-28 11:19:41 +00:00
2024-08-22 10:45:12 +02:00
2023-01-06 19:22:53 -08:00
2024-07-15 09:44:54 -03:00
2023-08-15 10:06:49 -06:00
2022-06-28 21:26:05 +02:00
2023-02-06 09:01:00 +00:00
2020-09-15 09:57:45 -05:00
2022-10-17 09:51:26 -05:00
2021-10-05 06:54:16 -05:00
2023-07-28 13:30:51 -07:00
2022-06-28 21:26:05 +02:00
2023-03-16 15:18:02 +01:00
2022-06-28 21:26:05 +02:00
2022-06-28 21:26:05 +02:00
2024-06-01 07:28:21 +02:00
2020-12-15 12:13:36 -08:00
2024-04-23 14:59:01 +10:00
2020-11-04 16:43:38 +01:00
2024-05-02 16:18:13 -04:00
2024-05-02 16:18:13 -04:00
2021-06-17 14:25:39 -04:00
2024-07-16 09:53:05 -04:00
2022-09-20 09:13:38 +02:00
2024-09-16 23:50:52 +02:00
2024-09-12 20:28:46 -07:00
2022-05-25 09:51:36 -07:00
2022-07-08 10:46:53 -07:00
2022-05-10 06:30:05 -06:00
2024-08-19 22:36:26 -04:00
2022-08-29 10:44:08 +02:00
2024-05-08 17:29:24 -04:00
2021-03-10 09:34:06 +01:00
2021-03-24 08:26:29 +01:00
2021-10-21 23:36:28 +02:00
2024-02-22 13:32:55 +01:00
2024-09-11 20:53:43 -07:00
2024-04-29 14:56:36 +02:00
2023-05-25 16:21:22 +02:00
2023-03-23 17:25:46 +01:00
2023-12-15 17:01:30 +01:00
2023-01-07 11:29:29 +01:00
2023-01-18 17:12:37 -08:00
2024-02-22 10:24:46 -08:00
2022-06-28 21:26:05 +02:00
2024-07-19 20:22:12 +02:00
2022-01-11 18:45:02 -08:00
2024-06-28 14:36:43 +02:00
2023-12-15 12:17:16 +00:00
2024-04-11 08:19:54 -07:00
2022-02-19 16:05:54 +00:00
2020-09-10 12:25:51 -07:00
2021-01-23 12:38:42 -08:00
2021-06-30 15:34:04 -06:00
2024-09-06 08:31:40 -06:00
2022-06-28 21:26:05 +02:00
2022-11-03 20:46:32 -07:00
2022-06-28 21:26:05 +02:00
2024-09-10 16:55:23 -07:00
2021-06-18 13:02:45 -07:00
2024-09-11 20:44:32 -07:00
2022-09-07 16:46:03 +02:00
2023-10-20 11:43:35 +01:00
2024-08-12 17:50:34 -07:00
2021-12-27 14:58:37 +00:00
2021-01-25 09:36:25 -05:00
2024-07-08 13:47:25 -04:00
2022-03-13 12:59:35 -04:00
2024-05-06 12:47:24 -04:00
2020-10-02 09:37:41 -04:00
2024-07-08 14:10:05 -04:00
2021-09-14 11:11:20 +02:00
2021-10-21 17:25:17 +02:00
2024-07-09 11:29:59 +02:00
2023-09-27 09:40:02 +02:00
2024-09-16 11:15:26 +02:00
2023-11-28 19:05:16 +00:00
2024-04-11 15:34:40 +02:00
2022-05-20 06:17:33 -06:00
2022-02-27 10:58:04 -08:00
2021-01-04 11:42:26 -05:00
2024-07-05 17:45:47 -07:00
2024-04-25 12:37:12 -07:00
2023-03-23 12:22:19 +09:00
2024-05-16 18:14:09 -05:00
2023-12-18 11:55:56 +01:00
2024-07-04 16:00:38 +02:00
2021-12-23 09:32:51 +01:00
2021-12-27 17:12:58 +01:00
2024-06-28 10:37:29 +02:00
2024-08-14 20:37:47 -07:00
2024-01-02 14:25:51 +00:00
2023-06-07 14:26:09 -06:00
2020-12-21 17:36:48 -08:00
2022-12-01 03:22:20 +00:00
2024-05-22 09:56:00 -07:00
2024-07-05 17:45:47 -07:00
2023-01-06 17:12:39 +00:00
2023-07-20 22:14:21 +12:00
2024-08-14 13:05:42 -04:00
2024-09-08 18:40:33 +01:00
2023-04-16 14:23:07 +02:00
2023-08-09 09:15:39 +02:00
2024-07-19 20:22:48 +02:00
2022-02-17 09:09:38 +01:00
2020-08-04 20:16:37 -07:00
2023-12-20 19:26:31 -05:00
2022-05-09 14:00:07 +02:00
2024-02-23 14:23:23 +02:00
2022-06-28 21:26:05 +02:00
2023-01-06 19:28:01 -08:00
2020-11-24 10:10:59 -06:00
2023-07-15 11:35:02 -07:00
2022-12-27 12:52:12 +01:00
2022-03-23 19:58:40 +01:00
2023-10-25 18:04:29 -07:00
2020-10-05 16:35:57 +01:00
2023-03-09 11:31:44 +01:00
2023-07-17 16:08:08 -07:00
2023-08-22 11:10:26 -06:00
2022-08-03 16:29:08 -07:00
2022-09-20 12:33:22 +02:00
2022-06-28 21:26:05 +02:00
2023-10-10 08:51:10 +02:00
2023-09-18 11:14:42 +02:00
2024-01-27 18:15:24 -08:00
2024-07-16 11:44:00 -04:00
2021-05-18 16:20:54 -05:00
2023-12-26 20:24:33 +00:00
2024-08-20 11:38:23 +02:00
2024-05-01 10:06:27 +02:00
2022-06-01 16:48:05 -07:00
2022-01-08 17:41:00 +09:00
2024-06-20 15:19:17 -06:00
2024-05-08 00:42:25 -07:00
2022-06-28 21:26:05 +02:00
2022-11-09 14:06:51 +01:00
2023-12-02 01:17:48 +02:00
2022-06-30 13:14:35 +02:00
2023-03-24 16:59:09 -04:00
2023-04-18 16:39:34 -07:00
2024-07-01 09:44:27 +01:00
2024-05-13 14:48:04 -07:00
2022-11-17 11:04:23 -08:00
2024-04-03 14:03:09 +02:00
2021-01-07 16:17:32 +01:00
2022-02-03 19:50:49 +01:00
2023-12-04 10:37:46 +01:00
2022-04-06 13:48:02 +01:00
2020-09-18 13:58:37 -07:00
2020-09-18 13:58:37 -07:00
2022-09-27 17:29:09 -07:00
2023-06-15 13:41:53 +02:00
2024-07-03 16:40:45 -04:00
2021-04-10 10:36:34 +02:00
2022-06-27 16:25:41 +02:00
2023-06-05 09:36:35 +02:00
2024-02-28 18:47:08 -07:00
2024-04-18 11:38:23 +02:00
2024-09-11 20:44:32 -07:00
2024-07-03 12:24:54 +02:00
2022-06-28 21:26:05 +02:00
2022-08-31 09:07:53 +02:00
2024-03-18 10:13:03 -04:00
2023-12-29 11:58:24 -08:00
2023-03-23 17:25:46 +01:00
2023-01-15 23:45:15 +02:00
2022-12-07 17:58:46 +01:00
2024-06-10 10:24:30 +02:00
2022-12-07 17:58:46 +01:00
2024-04-29 14:56:36 +02:00
2024-04-29 14:56:37 +02:00
2020-07-10 13:45:32 +02:00
2020-07-10 13:45:32 +02:00
2024-04-22 17:07:13 -04:00
2022-08-11 04:26:08 -04:00
2024-01-27 18:08:54 -08:00
2022-07-11 09:54:37 +02:00
2023-12-04 14:29:08 -07:00
2023-11-01 09:20:00 -04:00
2024-04-08 04:11:04 -04:00
2024-06-27 13:06:47 +02:00
2022-06-28 21:26:05 +02:00
2020-08-05 09:30:20 -04:00
2023-04-04 11:01:57 -04:00
2024-05-14 10:54:49 -04:00
2023-12-19 11:51:31 -07:00
2020-08-05 11:08:39 -04:00
2022-03-28 16:52:58 -04:00
2020-09-10 11:39:22 +02:00
2021-11-04 16:36:54 +01:00
2023-12-15 19:30:00 +03:00
2021-11-01 05:26:48 -04:00
2022-05-10 07:22:28 -04:00
2020-08-05 11:08:40 -04:00
2021-12-06 15:03:05 +01:00
2024-05-22 08:31:15 -04:00
2020-09-10 10:05:58 +02:00
2024-04-30 10:51:32 +02:00
2024-03-19 02:45:49 -04:00
2021-08-26 22:28:03 +02:00
2024-01-10 13:01:37 -05:00
2022-08-16 01:40:24 -04:00
2021-08-05 10:24:08 +01:00
2020-08-05 11:08:40 -04:00
2024-02-09 14:01:15 +01:00
2021-09-05 16:23:09 -04:00
2023-10-15 13:19:42 +01:00
2023-05-28 19:07:48 -06:00
2021-06-12 13:16:45 -07:00
2020-07-13 15:32:56 -07:00
2024-06-26 13:22:42 +02:00
2024-06-04 08:59:58 +02:00