Shuttleworth: Losing graciously
Shuttleworth: Losing graciously
Posted Feb 19, 2014 17:59 UTC (Wed) by HelloWorld (guest, #56129)In reply to: Shuttleworth: Losing graciously by fandingo
Parent article: Shuttleworth: Losing graciously
So what? systemd is already required to never die.
Posted Feb 19, 2014 18:29 UTC (Wed)
by fandingo (guest, #67019)
[Link]
This becomes a major problem with privileged services. Many services maintain a parent process that runs as root. Any compromise of this privileged service process (or malfeasance by it) allows it to kill it's hierarchy manager process and escape all control.
On the other hand, cgroups in a single-writer environment should be immune to this.
With systemd cgroup manager, PolKit would not authorize a process move outside all cgroups or to another cgroup (outside specific definitions like system.slice/sshd.service/ --> /user.slice/session.scope/).
The major benefit to systemd's cgroup manager is that it is not attackable via this style. It cannot be intentionally killed (it ignores all signals, even sigkill since it is PID 1), and if it were somehow forced to crash, the system would panic. Since PID 1 is the cgroup manager, there is no way to gain control of the kernel interface either.
There's no meaningful way to protect a reaper, unless you mandate that nothing in a hierarchy can run with enough privileges to kill the reaper. That would require a substantial change in many services, or requires additional sandboxing mechanisms in the kernel. (The kernel would need to perform a check that a caller of kill(2) is not trying to kill its reaper.)
Shuttleworth: Losing graciously
