]> git.ipfire.org Git - thirdparty/systemd.git/commit
pid1: allow removal of foreign-owned subcgroups of cgroups owned by some user (#35922)
authorLennart Poettering <lennart@poettering.net>
Wed, 8 Jan 2025 20:36:16 +0000 (21:36 +0100)
committerGitHub <noreply@github.com>
Wed, 8 Jan 2025 20:36:16 +0000 (21:36 +0100)
commita241b796faeb499822e9c1789c1940bedf96e8a0
tree08b6a35e15bf1adf2da0a593ffdab12d8962b36e
parent44368f84d7ddbec7a50648a65c27cb6a31090a29
parent1d5fd2e6211502fc48d5df425dd067c6b368dab3
pid1: allow removal of foreign-owned subcgroups of cgroups owned by some user (#35922)

This improves operation in unprivileged userns environments, where
unpriv user code might invoke a container with a delegated userns UID
range, and thus ends up with a subcgroup owned by another UID. With this
patch any user is always allowed to remove their own cgroups even if it
has subcgroups owned by other users.

This removes a DoS of sorts, and enforces the rule that users strictly
own everything below cgroups they own.