The kdbuswreck
The kdbuswreck
Posted Apr 22, 2015 22:38 UTC (Wed) by fandingo (guest, #67019)Parent article: The kdbuswreck
I suppose one "hack" that could be made is to say that it's a kdbus_capability, and they just so happen to correspond to the kernel capabilities. In the future, these kdbus capabilities could diverge from the kernel ones if there are compelling policy metadata that the kernel should deliver, or even better, kernel capabilities are fixed (from both a policy perspective and implementation throughout the kernel) and kdbus just continues to mirror.
> Eric Biederman was quick to suggest that this extension of the CAP_SYS_BOOT capability could be helpful to an attacker.
>> You mean all I need to do to get around all of the logging servers is
capture CAP_SYS_BOOT? Say like just capture this crazy watchdog program
that doesn't run as root so that it can only reboot the system? HeHeHe
So I can just trigger a clean reboot wait for journald, auditd, and
syslog all to shut down and then do evil things to the machine without
having to worry about erasing forensic evidence?
Supposing that an attacker gets CAP_SYS_BOOT, how exactly does the attack "wait for journald, auditd, and syslog all to shut down and then do evil things?" It's too dependent on improper shutdown order where logging services are stopped before other services. Additionally, I'm somewhat skeptical that a process has CAP_SYS_BOOT *and* has access to any worthwhile stuff while at the same time not having a more useful cap to exploit. There's already the same vulnerability, albeit with a shorter window: execute malicious code and issue reboot() before logging is durably written somewhere.
Kernel capabilities are fundamentally in such a sorry state because they've never been useful. It's clear that no one is going to step up and magically start improving them in the hopes that others will make use of them. Therefore, either scrap them entirely or start using them, expose the warts, and fix them.
