Re: [PATCH 0/2] userns: reject out-of-range uid_map/gid_map values
From: Natalie Klaus
Date: Wed Sep 30 2026 - 07:20:53 EST
On Mon, 28 Sep 2026, Eric W. Biederman wrote:
> Storing an unsigned long into an unsigned long long instead of an
> unsigned is a mistake in the opposite direction and is more costly.
>
> A more targeted fix would be to replace simple_strtoul with
> kstrtou32.
Agreed. I went with ull to keep the end-pointer parsing, but the buffer
is our own copy, so terminating each field and calling kstrtou32() on
it is simpler and cheaper. Will do that in v2.
> As for tests you probably also want to test some negative values as
> well, and probably a few good values.
Will add both.
Thanks for the review,
Natasha
Attachment:
publickey - natalie.klaus@runtimeverification.com - 0xE0915B3B.asc
Description: application/pgp-keys
Attachment:
signature.asc
Description: OpenPGP digital signature