Al Viro
dc6a664089
clone_private_mnt(): make sure that caller has CAP_SYS_ADMIN in the right userns
...
commit c28f922c9dcee0e4876a2c095939d77fe7e15116 upstream.
What we want is to verify there is that clone won't expose something
hidden by a mount we wouldn't be able to undo. "Wouldn't be able to undo"
may be a result of MNT_LOCKED on a child, but it may also come from
lacking admin rights in the userns of the namespace mount belongs to.
clone_private_mnt() checks the former, but not the latter.
There's a number of rather confusing CAP_SYS_ADMIN checks in various
userns during the mount, especially with the new mount API; they serve
different purposes and in case of clone_private_mnt() they usually,
but not always end up covering the missing check mentioned above.
Reviewed-by: Christian Brauner <brauner@kernel.org >
Reported-by: "Orlando, Noah" <Noah.Orlando@deshaw.com >
Fixes: 427215d85e ("ovl: prevent private clone if bind mount is not allowed")
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk >
[ merge conflict resolution: clone_private_mount() was reworked in
db04662e2f4f ("fs: allow detached mounts in clone_private_mount()").
Tweak the relevant ns_capable check so that it works on older kernels ]
Signed-off-by: Noah Orlando <Noah.Orlando@deshaw.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2025-07-24 08:53:20 +02:00
..
2024-11-22 15:38:37 +01:00
2023-08-29 20:21:42 -07:00
2025-04-10 14:37:37 +02:00
2025-03-07 16:45:38 +01:00
2023-08-28 11:39:14 -07:00
2023-08-29 20:21:42 -07:00
2023-08-29 20:21:42 -07:00
2025-07-17 18:35:21 +02:00
2025-07-24 08:53:16 +02:00
2025-07-06 11:00:08 +02:00
2023-08-28 09:31:32 -07:00
2025-06-27 11:08:42 +01:00
2024-08-19 06:04:25 +02:00
2024-10-04 16:29:48 +02:00
2024-01-20 11:51:37 +01:00
2023-08-28 10:17:14 -07:00
2025-06-04 14:41:57 +02:00
2024-10-04 16:29:48 +02:00
2024-12-27 13:58:50 +01:00
2023-08-29 20:21:42 -07:00
2025-07-17 18:35:16 +02:00
2025-04-10 14:37:35 +02:00
2023-08-29 17:45:22 -04:00
2024-08-03 08:54:15 +02:00
2025-06-27 11:08:47 +01:00
2025-07-10 16:03:21 +02:00
2024-10-22 15:46:20 +02:00
2023-08-29 20:21:42 -07:00
2024-12-09 10:31:45 +01:00
2025-07-06 11:00:06 +02:00
2025-06-27 11:08:42 +01:00
2025-04-25 10:45:47 +02:00
2025-04-25 10:45:47 +02:00
2025-04-10 14:37:34 +02:00
2023-08-29 20:21:42 -07:00
2024-02-23 09:25:16 +01:00
2025-05-02 07:51:01 +02:00
2025-07-24 08:53:13 +02:00
2025-06-27 11:08:44 +01:00
2025-06-27 11:08:58 +01:00
2025-07-06 11:00:09 +02:00
2025-06-19 15:28:16 +02:00
2024-08-19 06:04:23 +02:00
2023-08-29 20:21:42 -07:00
2023-09-18 12:03:46 -07:00
2025-07-10 16:03:18 +02:00
2023-04-13 13:13:52 -07:00
2025-06-27 11:08:44 +01:00
2025-06-19 15:28:23 +02:00
2023-08-31 12:07:34 -05:00
2025-01-23 17:21:19 +01:00
2023-08-29 20:21:42 -07:00
2025-06-19 15:28:07 +02:00
2025-06-19 15:28:23 +02:00
2023-08-29 20:21:42 -07:00
2024-06-12 11:11:30 +02:00
2025-06-04 14:42:02 +02:00
2025-07-06 11:00:08 +02:00
2025-07-17 18:35:14 +02:00
2025-06-04 14:42:11 +02:00
2023-08-29 20:21:42 -07:00
2023-08-29 20:21:42 -07:00
2024-12-09 10:33:01 +01:00
2023-07-24 10:30:04 +02:00
2024-08-19 06:04:26 +02:00
2024-08-19 06:04:25 +02:00
2025-07-24 08:53:17 +02:00
2025-06-19 15:28:23 +02:00
2024-04-27 17:11:41 +02:00
2024-04-13 13:07:34 +02:00
2024-09-12 11:11:27 +02:00
2025-02-08 09:52:28 +01:00
2025-05-22 14:12:19 +02:00
2023-08-29 20:21:42 -07:00
2024-12-14 20:00:20 +01:00
2025-03-22 12:50:41 -07:00
2024-06-16 13:47:33 +02:00
2025-02-27 04:10:44 -08:00
2024-02-23 09:25:13 +01:00
2024-04-03 15:28:44 +02:00
2025-07-10 16:03:18 +02:00
2023-08-28 10:17:14 -07:00
2023-08-11 09:04:57 +02:00
2024-08-29 17:33:33 +02:00
2025-05-22 14:12:12 +02:00
2025-02-17 09:40:16 +01:00
2024-08-29 17:33:27 +02:00
2025-02-08 09:52:26 +01:00
2023-05-15 09:42:01 +02:00
2025-06-04 14:42:24 +02:00
2023-05-17 09:16:59 +02:00
2024-11-08 16:28:19 +01:00
2024-07-25 09:50:54 +02:00
2023-06-28 10:28:11 -07:00
2023-08-18 10:12:11 -07:00
2023-07-11 11:41:34 +02:00
2025-07-17 18:35:07 +02:00
2025-04-10 14:37:44 +02:00
2024-10-04 16:29:56 +02:00
2024-08-19 06:04:28 +02:00
2025-02-08 09:51:42 +01:00
2025-04-25 10:45:10 +02:00
2025-06-19 15:28:43 +02:00
2023-10-12 18:53:36 +03:00
2023-08-21 13:46:25 -07:00
2024-06-27 13:49:00 +02:00
2023-08-14 18:48:02 +02:00
2024-12-09 10:31:41 +01:00
2023-08-29 20:21:42 -07:00
2024-01-31 16:18:54 -08:00
2025-04-25 10:45:46 +02:00
2023-08-23 14:17:43 -07:00
2023-08-19 12:12:12 +02:00
2025-02-01 18:37:54 +01:00
2024-07-27 11:34:10 +02:00
2023-08-02 09:13:09 -06:00
2023-04-18 16:30:02 -07:00
2025-03-22 12:50:44 -07:00
2025-07-24 08:53:20 +02:00
2023-07-13 10:28:04 +02:00
2024-11-01 01:58:32 +01:00
2024-04-10 16:35:57 +02:00
2023-05-19 04:30:22 +02:00
2023-05-19 04:30:22 +02:00
2023-07-13 10:28:04 +02:00
2023-05-24 08:42:16 -06:00
2023-08-15 08:32:45 +02:00
2023-08-06 15:08:35 +02:00
2023-05-24 11:03:59 +02:00
2025-03-22 12:50:37 -07:00
2025-05-02 07:50:45 +02:00
2023-07-13 10:28:04 +02:00
2023-12-03 07:33:03 +01:00
2023-05-17 15:20:17 +02:00
2024-08-19 06:04:25 +02:00
2023-05-23 21:43:26 -07:00
2025-04-25 10:45:31 +02:00
2023-02-20 11:53:11 -08:00
2025-06-27 11:08:57 +01:00