Merge patch series "userns: reject out-of-range uid_map/gid_map values"
Natasha Klaus <natalie.klaus@runtimeverification.com> says: map_write() silently truncates uid_map/gid_map/projid_map values above U32_MAX modulo 2^32 on 64-bit kernels, so e.g. "4294967301 1000 1" is installed as "5 1000 1" without an error. Patch 1 parses each field with kstrtou32() so such values fail with -EINVAL. Patch 2 adds selftests for out-of-range and negative values in each field and for the unchanged in-range path. This makes the parser more correct; it is not a security fix. The patch and the selftest were drafted by Claude Code (Claude Opus 5.5) in an interactive session; I reviewed, built and tested them. The assistant flagged the truncation while reading map_write(), and I confirmed it by writing to uid_map on a running kernel. Tested on v7.3-rc5-37-g551c722f4080 under virtme-ng, x86_64 defconfig with CONFIG_USER_NS: all 12 selftest cases pass on the patched kernel. On an unpatched 6.8 host the four above-u32 cases fail as expected, seven pass and the root-only case is skipped. Link: https://lore.kernel.org/all/20260928072537.115668-1-natalie.klaus@runtimeverification.com/ * patches from https://patch.msgid.link/20260930112854.373184-1-natalie.klaus@runtimeverification.com: selftests/namespaces: add uid_map/gid_map range tests userns: reject uid_map/gid_map values that do not fit in u32 Link: https://patch.msgid.link/20260930112854.373184-1-natalie.klaus@runtimeverification.com Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>