[PATCH 01/13] cred: gather the rules for acting on a task by uid

sashiko-bot at kernel.org sashiko-bot at kernel.org
Sun Oct 18 17:35:54 UTC 2026


> A number of operations let one task act on another without any capability,
> because the two belong to the same user: signals, scheduling attributes,
> priorities, resource limits, ptrace and more. Each of them compares the
> ids of the two credentials by hand. There are twelve such places, in six
> flavours that differ in which ids they look at, and nothing says that they
> belong together.
> 
> That makes them hard to review and hard to change. Nobody can tell from
> one of them whether it differs from its neighbour on purpose. Whoever
> wants to know what an equal uid is good for has to find all twelve, and so
> does whoever has to change it. A place that is overlooked is a hole.
> 
> Gather the rules in kernel/cred.c, side by side:
> 
>  rule     of the subject    of the object      euid 0 used for
> [ ... ]
> 
> The callers are converted one by one in the patches that follow.
> 
> Assisted-by: LLM
> Signed-off-by: Josef Bacik <josef at toxicpanda.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261018-b4-cred-ids-v1-0-7bdf2db4ea9f@toxicpanda.com?part=1




More information about the Linux-security-module-archive mailing list