From: "Theodore Ts'o" <tytso@mit.edu>
To: Jingzi Meng <mengjingzi@iie.ac.cn>
Cc: gregkh@linuxfoundation.org, gpiccoli@igalia.com,
john.ogness@linutronix.de, keescook@chromium.org,
linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org,
pmladek@suse.com, rostedt@goodmis.org, senozhatsky@chromium.org,
tony.luck@intel.com
Subject: Re: [PATCH] cap_syslog: remove CAP_SYS_ADMIN when dmesg_restrict
Date: Fri, 5 Jan 2024 09:49:44 -0500 [thread overview]
Message-ID: <20240105144944.GA246367@mit.edu> (raw)
In-Reply-To: <20240105062007.26965-1-mengjingzi@iie.ac.cn>
On Fri, Jan 05, 2024 at 02:20:07PM +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.
>
> Now that almost 13 years have passed, the legacy application may have
> had enough time to be updated.
What testing have you done to make sure that this is OK? "May have
had enough time"? That's not very reassuring?
Also, note that we can't actually reuse the bit position of
CAP_SYS_ADMIN since it's likely that there may be pre-existing
capability masks that are still using that position. So there isn't
all that much upside in trying to retire CAP_SYS_ADMIN --- if you as a
system administrator think it's not too course, then just don't use
it.
It's unclear to me what goal you have in trying to mess with the
capability definitions? Perhaps it might be useful if you were to
explicitly state your goals in these proposals?
Thanks,
- Ted
next prev parent reply other threads:[~2024-01-05 14:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-03 5:00 Suggestion for Capability Check Refinement in check_syslog_permissions() 孟敬姿
2024-01-03 6:59 ` Greg KH
2024-01-04 9:43 ` Petr Mladek
2024-01-04 16:27 ` Steven Rostedt
2024-01-05 6:20 ` [PATCH] cap_syslog: remove CAP_SYS_ADMIN when dmesg_restrict Jingzi Meng
2024-01-05 14:49 ` Theodore Ts'o [this message]
2024-01-05 15:23 ` Petr Mladek
2024-01-08 6:32 ` 孟敬姿
2024-01-08 17:57 ` Kees Cook
2024-01-15 1:24 ` 孟敬姿
2024-02-01 18:05 ` Kees Cook
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240105144944.GA246367@mit.edu \
--to=tytso@mit.edu \
--cc=gpiccoli@igalia.com \
--cc=gregkh@linuxfoundation.org \
--cc=john.ogness@linutronix.de \
--cc=keescook@chromium.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mengjingzi@iie.ac.cn \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=senozhatsky@chromium.org \
--cc=tony.luck@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox