Christian Brauner 1ab29965b3
exec: handle idmapped mounts
When executing a setuid binary the kernel will verify in bprm_fill_uid()
that the inode has a mapping in the caller's user namespace before
setting the callers uid and gid. Let bprm_fill_uid() handle idmapped
mounts. If the inode is accessed through an idmapped mount it is mapped
according to the mount's user namespace. Afterwards the checks are
identical to non-idmapped mounts. If the initial user namespace is
passed nothing changes so non-idmapped mounts will see identical
behavior as before.

Link: https://lore.kernel.org/r/20210121131959.646623-24-christian.brauner@ubuntu.com
Cc: Christoph Hellwig <hch@lst.de>
Cc: David Howells <dhowells@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: James Morris <jamorris@linux.microsoft.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-01-24 14:27:19 +01:00
..
2021-01-24 14:27:17 +01:00
2021-01-24 14:27:16 +01:00
2021-01-24 14:27:16 +01:00
2021-01-24 14:27:17 +01:00
2021-01-24 14:27:17 +01:00
2021-01-24 14:27:17 +01:00
2021-01-24 14:27:17 +01:00
2021-01-24 14:27:17 +01:00
2021-01-24 14:27:17 +01:00
2021-01-24 14:27:17 +01:00
2021-01-24 14:27:17 +01:00
2021-01-24 14:27:17 +01:00
2021-01-24 14:27:17 +01:00
2021-01-24 14:27:17 +01:00
2021-01-24 14:27:17 +01:00
2021-01-24 14:27:17 +01:00
2021-01-24 14:27:17 +01:00
2021-01-24 14:27:16 +01:00
2021-01-24 14:27:16 +01:00
2021-01-24 14:27:16 +01:00
2021-01-24 14:27:17 +01:00
2021-01-24 14:27:17 +01:00
2021-01-24 14:27:17 +01:00
2021-01-24 14:27:17 +01:00
2021-01-24 14:27:17 +01:00
2021-01-24 14:27:18 +01:00
2021-01-24 14:27:16 +01:00
2021-01-24 14:27:16 +01:00
2021-01-24 14:27:17 +01:00
2021-01-24 14:27:16 +01:00
2021-01-24 14:27:17 +01:00
2021-01-24 14:27:17 +01:00
2020-12-17 13:22:17 -08:00
\n
2020-12-17 11:00:37 -08:00
2021-01-24 14:27:16 +01:00
2021-01-24 14:27:17 +01:00
2021-01-24 14:27:17 +01:00
2021-01-24 14:27:17 +01:00
2021-01-24 14:27:17 +01:00
2021-01-24 14:27:16 +01:00
2021-01-24 14:27:17 +01:00
2021-01-24 14:27:17 +01:00
2021-01-24 14:27:16 +01:00
2021-01-24 14:27:17 +01:00
2020-12-16 12:57:51 -08:00
2020-12-15 22:46:19 -08:00
\n
2020-10-15 15:03:10 -07:00
2020-12-19 11:18:38 -08:00
2021-01-24 14:27:19 +01:00
2021-01-24 14:27:19 +01:00
2021-01-24 14:27:19 +01:00
2021-01-24 14:27:17 +01:00
2020-10-23 11:33:41 -07:00
2021-01-24 14:27:15 +01:00
2021-01-24 14:27:18 +01:00
2020-12-01 14:53:39 -07:00
2021-01-24 14:27:17 +01:00
2020-10-23 11:33:41 -07:00
2021-01-24 14:27:19 +01:00
2020-10-24 12:40:18 -07:00
2021-01-24 14:27:17 +01:00
2020-12-01 14:53:39 -07:00
2020-12-01 14:53:39 -07:00
2021-01-24 14:27:18 +01:00