summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2026-10-12 11:01:24 +0200
committerChristian Brauner <brauner@kernel.org>2026-10-12 11:01:24 +0200
commitfbc59bc7f05c62b0c1607b92eaf8175e75ef755d (patch)
treeb0507ff47c3317e4855d0f5631c610a93f1b6c7b /tools/lib/python
parent15aa70de9f706fb0e3852f636b8a0a9d5bc048ab (diff)
parent8b7b7739ea6a8797391189c6d07897584b611f7f (diff)
downloadlinux-next-fbc59bc7f05c62b0c1607b92eaf8175e75ef755d.tar.gz
linux-next-fbc59bc7f05c62b0c1607b92eaf8175e75ef755d.zip
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>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions