Re: [PATCH] kmsg: honor dmesg_restrict sysctl on /dev/kmsg

2013-05-08 Thread Steven Rostedt
On Wed, 2013-05-08 at 14:26 -0700, Kees Cook wrote: > Yeah, that'll be fine. I kind of like having the longer rationale in > the commit message for future reference (i.e. destructive vs > non-destructive, etc), but I'd rather see the code fixed. :) There's no reason not to have both, is there?

Re: [PATCH] kmsg: honor dmesg_restrict sysctl on /dev/kmsg

2013-05-08 Thread Kees Cook
On Wed, May 8, 2013 at 2:22 PM, Andrew Morton wrote: > On Tue, 30 Apr 2013 10:25:41 -0700 Kees Cook wrote: > >> To fix /dev/kmsg, let's compare the existing interfaces and what they allow: >> >> - /proc/kmsg allows: >> - open (SYSLOG_ACTION_OPEN) if CAP_SYSLOG since it uses a destructive >>

Re: [PATCH] kmsg: honor dmesg_restrict sysctl on /dev/kmsg

2013-05-08 Thread Andrew Morton
On Tue, 30 Apr 2013 10:25:41 -0700 Kees Cook wrote: > To fix /dev/kmsg, let's compare the existing interfaces and what they allow: > > - /proc/kmsg allows: > - open (SYSLOG_ACTION_OPEN) if CAP_SYSLOG since it uses a destructive >single-reader interface (SYSLOG_ACTION_READ). > -

Re: [PATCH] kmsg: honor dmesg_restrict sysctl on /dev/kmsg

2013-05-08 Thread Andrew Morton
On Tue, 30 Apr 2013 10:25:41 -0700 Kees Cook keesc...@chromium.org wrote: To fix /dev/kmsg, let's compare the existing interfaces and what they allow: - /proc/kmsg allows: - open (SYSLOG_ACTION_OPEN) if CAP_SYSLOG since it uses a destructive single-reader interface (SYSLOG_ACTION_READ).

Re: [PATCH] kmsg: honor dmesg_restrict sysctl on /dev/kmsg

2013-05-08 Thread Kees Cook
On Wed, May 8, 2013 at 2:22 PM, Andrew Morton a...@linux-foundation.org wrote: On Tue, 30 Apr 2013 10:25:41 -0700 Kees Cook keesc...@chromium.org wrote: To fix /dev/kmsg, let's compare the existing interfaces and what they allow: - /proc/kmsg allows: - open (SYSLOG_ACTION_OPEN) if

Re: [PATCH] kmsg: honor dmesg_restrict sysctl on /dev/kmsg

2013-05-08 Thread Steven Rostedt
On Wed, 2013-05-08 at 14:26 -0700, Kees Cook wrote: Yeah, that'll be fine. I kind of like having the longer rationale in the commit message for future reference (i.e. destructive vs non-destructive, etc), but I'd rather see the code fixed. :) There's no reason not to have both, is there? --

Re: [PATCH] kmsg: honor dmesg_restrict sysctl on /dev/kmsg

2013-05-07 Thread Josh Boyer
On Tue, Apr 30, 2013 at 10:25:41AM -0700, Kees Cook wrote: > To fix /dev/kmsg, let's compare the existing interfaces and what they allow: > > - /proc/kmsg allows: >  - open (SYSLOG_ACTION_OPEN) if CAP_SYSLOG since it uses a destructive >single-reader interface (SYSLOG_ACTION_READ). >  -

Re: [PATCH] kmsg: honor dmesg_restrict sysctl on /dev/kmsg

2013-05-07 Thread Josh Boyer
On Tue, Apr 30, 2013 at 10:25:41AM -0700, Kees Cook wrote: To fix /dev/kmsg, let's compare the existing interfaces and what they allow: - /proc/kmsg allows:  - open (SYSLOG_ACTION_OPEN) if CAP_SYSLOG since it uses a destructive single-reader interface (SYSLOG_ACTION_READ).  - everything,

Re: [PATCH] kmsg: honor dmesg_restrict sysctl on /dev/kmsg

2013-04-30 Thread Kees Cook
On Tue, Apr 30, 2013 at 11:35 AM, Josh Boyer wrote: > On Tue, Apr 30, 2013 at 10:25:41AM -0700, Kees Cook wrote: >> To fix /dev/kmsg, let's compare the existing interfaces and what they allow: >> >> - /proc/kmsg allows: >> - open (SYSLOG_ACTION_OPEN) if CAP_SYSLOG since it uses a destructive >>

Re: [PATCH] kmsg: honor dmesg_restrict sysctl on /dev/kmsg

2013-04-30 Thread Josh Boyer
On Tue, Apr 30, 2013 at 10:25:41AM -0700, Kees Cook wrote: > To fix /dev/kmsg, let's compare the existing interfaces and what they allow: > > - /proc/kmsg allows: >  - open (SYSLOG_ACTION_OPEN) if CAP_SYSLOG since it uses a destructive >single-reader interface (SYSLOG_ACTION_READ). >  -

[PATCH] kmsg: honor dmesg_restrict sysctl on /dev/kmsg

2013-04-30 Thread Kees Cook
To fix /dev/kmsg, let's compare the existing interfaces and what they allow: - /proc/kmsg allows:  - open (SYSLOG_ACTION_OPEN) if CAP_SYSLOG since it uses a destructive single-reader interface (SYSLOG_ACTION_READ).  - everything, after an open. - syslog syscall allows:  - anything, if

[PATCH] kmsg: honor dmesg_restrict sysctl on /dev/kmsg

2013-04-30 Thread Kees Cook
To fix /dev/kmsg, let's compare the existing interfaces and what they allow: - /proc/kmsg allows:  - open (SYSLOG_ACTION_OPEN) if CAP_SYSLOG since it uses a destructive single-reader interface (SYSLOG_ACTION_READ).  - everything, after an open. - syslog syscall allows:  - anything, if

Re: [PATCH] kmsg: honor dmesg_restrict sysctl on /dev/kmsg

2013-04-30 Thread Josh Boyer
On Tue, Apr 30, 2013 at 10:25:41AM -0700, Kees Cook wrote: To fix /dev/kmsg, let's compare the existing interfaces and what they allow: - /proc/kmsg allows:  - open (SYSLOG_ACTION_OPEN) if CAP_SYSLOG since it uses a destructive single-reader interface (SYSLOG_ACTION_READ).  - everything,

Re: [PATCH] kmsg: honor dmesg_restrict sysctl on /dev/kmsg

2013-04-30 Thread Kees Cook
On Tue, Apr 30, 2013 at 11:35 AM, Josh Boyer jwbo...@redhat.com wrote: On Tue, Apr 30, 2013 at 10:25:41AM -0700, Kees Cook wrote: To fix /dev/kmsg, let's compare the existing interfaces and what they allow: - /proc/kmsg allows: - open (SYSLOG_ACTION_OPEN) if CAP_SYSLOG since it uses a

Re: [PATCH] kmsg: Honor dmesg_restrict sysctl on /dev/kmsg

2013-04-08 Thread Josh Boyer
ris" > >> , "Linus Torvalds" > >> , "Christian Kujau" > >> , "# 3.4.x" , > >> "LKML" > >> Sent: Monday, April 1, 2013 7:51:57 PM > >> Subject: Re: [PATCH] kmsg: Honor dmesg_restrict sysctl on /dev/k

Re: [PATCH] kmsg: Honor dmesg_restrict sysctl on /dev/kmsg

2013-04-08 Thread Kees Cook
u" , >> "# 3.4.x" , >> "LKML" >> Sent: Monday, April 1, 2013 7:51:57 PM >> Subject: Re: [PATCH] kmsg: Honor dmesg_restrict sysctl on /dev/kmsg >> >> On Fri, Mar 22, 2013 at 3:14 PM, Josh Boyer wrote: >> > On Fri, Mar 22, 2

Re: [PATCH] kmsg: Honor dmesg_restrict sysctl on /dev/kmsg

2013-04-08 Thread Kees Cook
, Christian Kujau li...@nerdbynature.de, # 3.4.x sta...@vger.kernel.org, LKML linux-kernel@vger.kernel.org Sent: Monday, April 1, 2013 7:51:57 PM Subject: Re: [PATCH] kmsg: Honor dmesg_restrict sysctl on /dev/kmsg On Fri, Mar 22, 2013 at 3:14 PM, Josh Boyer jwbo...@redhat.com wrote: On Fri

Re: [PATCH] kmsg: Honor dmesg_restrict sysctl on /dev/kmsg

2013-04-08 Thread Josh Boyer
epa...@redhat.com, Linus Torvalds torva...@linux-foundation.org, Christian Kujau li...@nerdbynature.de, # 3.4.x sta...@vger.kernel.org, LKML linux-kernel@vger.kernel.org Sent: Monday, April 1, 2013 7:51:57 PM Subject: Re: [PATCH] kmsg: Honor dmesg_restrict sysctl on /dev/kmsg On Fri

Re: [PATCH] kmsg: Honor dmesg_restrict sysctl on /dev/kmsg

2013-04-01 Thread Josh Boyer
- Original Message - > From: "Kees Cook" > To: "Josh Boyer" > Cc: "Andrew Morton" , "Eric Paris" > , "Linus Torvalds" > , "Christian Kujau" , > "# 3.4.x" , > "LKML" > Sent

Re: [PATCH] kmsg: Honor dmesg_restrict sysctl on /dev/kmsg

2013-04-01 Thread Kees Cook
On Fri, Mar 22, 2013 at 3:14 PM, Josh Boyer wrote: > On Fri, Mar 22, 2013 at 02:54:48PM -0700, Andrew Morton wrote: >> >> poke. Nothing got applied. I'll drop >> kmsg-honor-dmesg_restrict-sysctl-on-dev-kmsg.patch, see if that has any >> effect ;) > > Oh dear. > > Eric, were you going to cleanup

Re: [PATCH] kmsg: Honor dmesg_restrict sysctl on /dev/kmsg

2013-04-01 Thread Kees Cook
On Fri, Mar 22, 2013 at 3:14 PM, Josh Boyer jwbo...@redhat.com wrote: On Fri, Mar 22, 2013 at 02:54:48PM -0700, Andrew Morton wrote: poke. Nothing got applied. I'll drop kmsg-honor-dmesg_restrict-sysctl-on-dev-kmsg.patch, see if that has any effect ;) Oh dear. Eric, were you going to

Re: [PATCH] kmsg: Honor dmesg_restrict sysctl on /dev/kmsg

2013-04-01 Thread Josh Boyer
...@vger.kernel.org, LKML linux-kernel@vger.kernel.org Sent: Monday, April 1, 2013 7:51:57 PM Subject: Re: [PATCH] kmsg: Honor dmesg_restrict sysctl on /dev/kmsg On Fri, Mar 22, 2013 at 3:14 PM, Josh Boyer jwbo...@redhat.com wrote: On Fri, Mar 22, 2013 at 02:54:48PM -0700, Andrew Morton wrote: poke

Re: [PATCH] kmsg: Honor dmesg_restrict sysctl on /dev/kmsg

2013-03-22 Thread Josh Boyer
On Fri, Mar 22, 2013 at 02:54:48PM -0700, Andrew Morton wrote: > > poke. Nothing got applied. I'll drop > kmsg-honor-dmesg_restrict-sysctl-on-dev-kmsg.patch, see if that has any > effect ;) Oh dear. Eric, were you going to cleanup your suggestion and send it out? josh -- To unsubscribe from

Re: [PATCH] kmsg: Honor dmesg_restrict sysctl on /dev/kmsg

2013-03-22 Thread Andrew Morton
poke. Nothing got applied. I'll drop kmsg-honor-dmesg_restrict-sysctl-on-dev-kmsg.patch, see if that has any effect ;) From: Josh Boyer Subject: kmsg: honor dmesg_restrict sysctl on /dev/kmsg Originally, the addition of dmesg_restrict covered both the syslog method of accessing dmesg, as

Re: [PATCH] kmsg: Honor dmesg_restrict sysctl on /dev/kmsg

2013-03-22 Thread Andrew Morton
poke. Nothing got applied. I'll drop kmsg-honor-dmesg_restrict-sysctl-on-dev-kmsg.patch, see if that has any effect ;) From: Josh Boyer jwbo...@redhat.com Subject: kmsg: honor dmesg_restrict sysctl on /dev/kmsg Originally, the addition of dmesg_restrict covered both the syslog method of

Re: [PATCH] kmsg: Honor dmesg_restrict sysctl on /dev/kmsg

2013-03-22 Thread Josh Boyer
On Fri, Mar 22, 2013 at 02:54:48PM -0700, Andrew Morton wrote: poke. Nothing got applied. I'll drop kmsg-honor-dmesg_restrict-sysctl-on-dev-kmsg.patch, see if that has any effect ;) Oh dear. Eric, were you going to cleanup your suggestion and send it out? josh -- To unsubscribe from

Re: [PATCH] kmsg: Honor dmesg_restrict sysctl on /dev/kmsg

2013-02-27 Thread Kees Cook
On Wed, Feb 27, 2013 at 2:19 PM, Josh Boyer wrote: > On Wed, Feb 27, 2013 at 03:46:41PM -0500, Eric Paris wrote: >> Fine Fine, I'll get off my lazy butt and look at this. > > Shock! > >> Right. Now we have /proc/kmsg, /dev/kmsg, and the syscall. /proc/kmsg >> and the syscall both use

Re: [PATCH] kmsg: Honor dmesg_restrict sysctl on /dev/kmsg

2013-02-27 Thread Josh Boyer
On Wed, Feb 27, 2013 at 03:46:41PM -0500, Eric Paris wrote: > Fine Fine, I'll get off my lazy butt and look at this. Shock! > Right. Now we have /proc/kmsg, /dev/kmsg, and the syscall. /proc/kmsg > and the syscall both use do_syslog() which calls > check_syslog_permissions() and

Re: [PATCH] kmsg: Honor dmesg_restrict sysctl on /dev/kmsg

2013-02-27 Thread Eric Paris
Fine Fine, I'll get off my lazy butt and look at this. On Wed, 2013-02-27 at 10:14 -0800, Kees Cook wrote: > On Wed, Feb 27, 2013 at 10:01 AM, Josh Boyer wrote: > > On Wed, Feb 27, 2013 at 09:54:27AM -0800, Kees Cook wrote: > >> On Fri, Feb 22, 2013 at 01:18:57PM -0500, Josh Boyer wrote: > >> >

Re: [PATCH] kmsg: Honor dmesg_restrict sysctl on /dev/kmsg

2013-02-27 Thread Kees Cook
On Wed, Feb 27, 2013 at 10:01 AM, Josh Boyer wrote: > On Wed, Feb 27, 2013 at 09:54:27AM -0800, Kees Cook wrote: >> 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

Re: [PATCH] kmsg: Honor dmesg_restrict sysctl on /dev/kmsg

2013-02-27 Thread Josh Boyer
On Wed, Feb 27, 2013 at 10:05:47AM -0800, Kees Cook wrote: > 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

Re: [PATCH] kmsg: Honor dmesg_restrict sysctl on /dev/kmsg

2013-02-27 Thread Kees Cook
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.

Re: [PATCH] kmsg: Honor dmesg_restrict sysctl on /dev/kmsg

2013-02-27 Thread Josh Boyer
On Wed, Feb 27, 2013 at 09:54:27AM -0800, Kees Cook wrote: > 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

Re: [PATCH] kmsg: Honor dmesg_restrict sysctl on /dev/kmsg

2013-02-27 Thread Kees Cook
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. > > However,

Re: [PATCH] kmsg: Honor dmesg_restrict sysctl on /dev/kmsg

2013-02-27 Thread Kees Cook
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. However, commit

Re: [PATCH] kmsg: Honor dmesg_restrict sysctl on /dev/kmsg

2013-02-27 Thread Josh Boyer
On Wed, Feb 27, 2013 at 09:54:27AM -0800, Kees Cook wrote: 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

Re: [PATCH] kmsg: Honor dmesg_restrict sysctl on /dev/kmsg

2013-02-27 Thread Kees Cook
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,

Re: [PATCH] kmsg: Honor dmesg_restrict sysctl on /dev/kmsg

2013-02-27 Thread Josh Boyer
On Wed, Feb 27, 2013 at 10:05:47AM -0800, Kees Cook wrote: 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

Re: [PATCH] kmsg: Honor dmesg_restrict sysctl on /dev/kmsg

2013-02-27 Thread Kees Cook
On Wed, Feb 27, 2013 at 10:01 AM, Josh Boyer jwbo...@redhat.com wrote: On Wed, Feb 27, 2013 at 09:54:27AM -0800, Kees Cook wrote: 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

Re: [PATCH] kmsg: Honor dmesg_restrict sysctl on /dev/kmsg

2013-02-27 Thread Eric Paris
Fine Fine, I'll get off my lazy butt and look at this. On Wed, 2013-02-27 at 10:14 -0800, Kees Cook wrote: On Wed, Feb 27, 2013 at 10:01 AM, Josh Boyer jwbo...@redhat.com wrote: On Wed, Feb 27, 2013 at 09:54:27AM -0800, Kees Cook wrote: On Fri, Feb 22, 2013 at 01:18:57PM -0500, Josh Boyer

Re: [PATCH] kmsg: Honor dmesg_restrict sysctl on /dev/kmsg

2013-02-27 Thread Josh Boyer
On Wed, Feb 27, 2013 at 03:46:41PM -0500, Eric Paris wrote: Fine Fine, I'll get off my lazy butt and look at this. Shock! Right. Now we have /proc/kmsg, /dev/kmsg, and the syscall. /proc/kmsg and the syscall both use do_syslog() which calls check_syslog_permissions() and security_syslog().

Re: [PATCH] kmsg: Honor dmesg_restrict sysctl on /dev/kmsg

2013-02-27 Thread Kees Cook
On Wed, Feb 27, 2013 at 2:19 PM, Josh Boyer jwbo...@redhat.com wrote: On Wed, Feb 27, 2013 at 03:46:41PM -0500, Eric Paris wrote: Fine Fine, I'll get off my lazy butt and look at this. Shock! Right. Now we have /proc/kmsg, /dev/kmsg, and the syscall. /proc/kmsg and the syscall both use

[PATCH] kmsg: Honor dmesg_restrict sysctl on /dev/kmsg

2013-02-22 Thread Josh Boyer
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. However, commit 12b3052c3ee (capabilities/syslog: open code cap_syslog logic to

[PATCH] kmsg: Honor dmesg_restrict sysctl on /dev/kmsg

2013-02-22 Thread Josh Boyer
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. However, commit 12b3052c3ee (capabilities/syslog: open code cap_syslog logic to