From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 27 Feb 2013 10:05:47 -0800 From: Kees Cook To: Josh Boyer Cc: Andrew Morton , Linus Torvalds , eparis@redhat.com, Christian Kujau , stable@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] kmsg: Honor dmesg_restrict sysctl on /dev/kmsg Message-ID: <20130227180547.GR26411@outflux.net> References: <20130222181856.GA2419@hansolo.jdub.homelinux.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130222181856.GA2419@hansolo.jdub.homelinux.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: Hi, On Fri, Feb 22, 2013 at 01:18:57PM -0500, Josh Boyer wrote: > Originally, the addition of dmesg_restrict covered both the syslog > method of accessing dmesg, as well as /dev/kmsg itself. This was done > indirectly by security_syslog calling cap_syslog before doing any LSM > checks. Actually, are the security_syslog() checks in /dev/kmsg correct? There is only one used in devkmsg_open which uses SYSLOG_ACTION_READ_ALL. Shouldn't it be using SYSLOG_ACTION_OPEN? And have SYSLOG_ACTION_READ_ALL added to devkmsg_read? (And should we add one for write?) -Kees -- Kees Cook Chrome OS Security