Skip to content
Commit 467a726b authored by Michal Koutný's avatar Michal Koutný Committed by Tejun Heo
Browse files

cgroup-v1: Correct privileges check in release_agent writes

The idea is to check: a) the owning user_ns of cgroup_ns, b)
capabilities in init_user_ns.

The commit 24f60085 ("cgroup-v1: Require capabilities to set
release_agent") got this wrong in the write handler of release_agent
since it checked user_ns of the opener (may be different from the owning
user_ns of cgroup_ns).
Secondly, to avoid possibly confused deputy, the capability of the
opener must be checked.

Fixes: 24f60085 ("cgroup-v1: Require capabilities to set release_agent")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/stable/20220216121142.GB30035@blackbody.suse.cz/


Signed-off-by: default avatarMichal Koutný <mkoutny@suse.com>
Reviewed-by: default avatarMasami Ichikawa(CIP) <masami.ichikawa@cybertrust.co.jp>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 6d3971da
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment