cgroup-v1: Require capabilities to set release_agent
authorEric W. Biederman <ebiederm@xmission.com>
Thu, 20 Jan 2022 17:04:01 +0000 (11:04 -0600)
committerTejun Heo <tj@kernel.org>
Tue, 1 Feb 2022 17:28:00 +0000 (07:28 -1000)
commit3ae097a730e69624638ff1f15fd504f2a4443b96
tree116de0e1cf8b69ec7bdc1fec15a9a623d77eee04
parentf7b8bad902074430aa3a91243a21b447f809146e
cgroup-v1: Require capabilities to set release_agent

The cgroup release_agent is called with call_usermodehelper.  The function
call_usermodehelper starts the release_agent with a full set fo capabilities.
Therefore require capabilities when setting the release_agaent.

Reported-by: Tabitha Sable <tabitha.c.sable@gmail.com>
Tested-by: Tabitha Sable <tabitha.c.sable@gmail.com>
Fixes: b10d1bfa990e ("Task Control Groups: automatic userspace notification of idle cgroups")
Cc: stable@vger.kernel.org # v2.6.24+
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/cgroup/cgroup-v1.c