Re: [PATCH] cap_syslog: remove CAP_SYS_ADMIN when dmesg_restrict

From: Kees Cook
Date: Thu Feb 01 2024 - 13:09:50 EST


On Fri, 05 Jan 2024 14:20:07 +0800, Jingzi Meng wrote:
> CAP_SYSLOG was separated from CAP_SYS_ADMIN and introduced in Linux
> 2.6.37 (2010-11). For a long time, certain syslog actions required
> CAP_SYS_ADMIN or CAP_SYSLOG. Maybe it’s time to officially remove
> CAP_SYS_ADMIN for more fine-grained control.
>
> CAP_SYS_ADMIN was once removed but added back for backwards
> compatibility reasons. In commit 38ef4c2e437d ("syslog: check cap_syslog
> when dmesg_restrict") (2010-12), CAP_SYS_ADMIN was no longer needed. And
> in commit ee24aebffb75 ("cap_syslog: accept CAP_SYS_ADMIN for now")
> (2011-02), it was accepted again. Since then, CAP_SYS_ADMIN has been
> preserved.
>
> [...]

Applied to for-next/hardening, thanks!

[1/1] cap_syslog: remove CAP_SYS_ADMIN when dmesg_restrict
https://git.kernel.org/kees/c/09ce61e27db8

Take care,

--
Kees Cook