[PATCH] cap_syslog: remove CAP_SYS_ADMIN when dmesg_restrict

2024-01-04 Thread Jingzi Meng
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 ba

Re: [RFC PATCH] VMCI: Silence memcpy() run-time false positive warning

2024-01-04 Thread Gustavo A. R. Silva
On 1/4/24 12:31, Vegard Nossum wrote: On 01/01/2024 14:55, Greg Kroah-Hartman wrote: On Mon, Jan 01, 2024 at 05:08:28AM -0800, Harshit Mogalapalli wrote: One possible way to silence the warning is to split the memcpy() into two parts -- one -- copying the msg and second taking care of paylo

Re: [RFC PATCH] VMCI: Silence memcpy() run-time false positive warning

2024-01-04 Thread Vegard Nossum
On 01/01/2024 14:55, Greg Kroah-Hartman wrote: On Mon, Jan 01, 2024 at 05:08:28AM -0800, Harshit Mogalapalli wrote: One possible way to silence the warning is to split the memcpy() into two parts -- one -- copying the msg and second taking care of payload. And what are the performance impact

Re: Suggestion for Capability Check Refinement in check_syslog_permissions()

2024-01-04 Thread Steven Rostedt
On Thu, 4 Jan 2024 10:43:53 +0100 Petr Mladek wrote: > And CAP_SYS_ADMIN has really been deprecated last 13 years, see the > commit ee24aebffb75a7f940cf ("cap_syslog: accept CAP_SYS_ADMIN for now"). > > Maybe, it is really time to remove it. Perhaps what we should do is to remove it in a simple

Re: Suggestion for Capability Check Refinement in check_syslog_permissions()

2024-01-04 Thread Petr Mladek
On Wed 2024-01-03 07:59:18, Greg KH wrote: > On Wed, Jan 03, 2024 at 01:00:58PM +0800, 孟敬姿 wrote: > > Hi, we suggest revisiting the capability checks in > > check_syslog_permissions(). Currently CAP_SYSLOG is checked first, and > > if it’s not there but there is a CAP_SYS_ADMIN, it can also pass th