Re: [PATCH] audit: do not panic kernel on invalid audit parameter

2018-02-20 Thread Paul Moore
On Tue, Feb 20, 2018 at 5:00 PM, Greg Edwards wrote: > On Tue, Feb 20, 2018 at 04:45:26PM -0500, Paul Moore wrote: >> On Tue, Feb 20, 2018 at 4:33 PM, Greg Edwards wrote: >>> If you pass in an invalid audit kernel boot parameter, e.g. 'audit=off', >>> the

Re: [PATCH] audit: return on memory error to avoid null pointer dereference

2018-02-20 Thread Richard Guy Briggs
On 2018-02-21 01:47, Richard Guy Briggs wrote: > If there is a memory allocation error when trying to change an audit > kernel feature value, the ignored allocation error will trigger a NULL > pointer dereference oops on subsequent use of that pointer. Return > instead. > > See:

[PATCH] audit: return on memory error to avoid null pointer dereference

2018-02-20 Thread Richard Guy Briggs
If there is a memory allocation error when trying to change an audit kernel feature value, the ignored allocation error will trigger a NULL pointer dereference oops on subsequent use of that pointer. Return instead. See: https://github.com/linux-audit/audit-kernel/issues/76 Signed-off-by:

Re: [PATCH] audit: do not panic kernel on invalid audit parameter

2018-02-20 Thread Richard Guy Briggs
On 2018-02-20 16:45, Paul Moore wrote: > On Tue, Feb 20, 2018 at 4:33 PM, Greg Edwards wrote: > > If you pass in an invalid audit kernel boot parameter, e.g. 'audit=off', > > the kernel panics very early in boot with no output on the console > > indicating the problem. > > I'm

Re: [PATCH 4.10 070/111] audit: fix auditd/kernel connection state tracking

2018-02-20 Thread Paul Moore
On Tue, Feb 20, 2018 at 7:37 AM, Peter Zijlstra wrote: > On Tue, Mar 28, 2017 at 02:30:56PM +0200, Greg Kroah-Hartman wrote: >> 4.10-stable review patch. If anyone has any objections, please let me know. > >> + if (!(auditd_test_task(current) || >> + (current

Re: [PATCH 4.10 070/111] audit: fix auditd/kernel connection state tracking

2018-02-20 Thread Peter Zijlstra
On Tue, Feb 20, 2018 at 08:25:21AM -0500, Paul Moore wrote: > On Tue, Feb 20, 2018 at 7:37 AM, Peter Zijlstra wrote: > > On Tue, Mar 28, 2017 at 02:30:56PM +0200, Greg Kroah-Hartman wrote: > >> 4.10-stable review patch. If anyone has any objections, please let me > >>

Re: [PATCH 4.10 070/111] audit: fix auditd/kernel connection state tracking

2018-02-20 Thread Paul Moore
On Tue, Feb 20, 2018 at 9:06 AM, Peter Zijlstra wrote: > On Tue, Feb 20, 2018 at 08:25:21AM -0500, Paul Moore wrote: >> On Tue, Feb 20, 2018 at 7:37 AM, Peter Zijlstra wrote: >> > On Tue, Mar 28, 2017 at 02:30:56PM +0200, Greg Kroah-Hartman wrote: >>

Re: [PATCH 4.10 070/111] audit: fix auditd/kernel connection state tracking

2018-02-20 Thread Peter Zijlstra
On Tue, Feb 20, 2018 at 09:51:08AM -0500, Paul Moore wrote: > On Tue, Feb 20, 2018 at 9:06 AM, Peter Zijlstra wrote: > > It's not at all clear to me what that code does, I just stumbled upon > > __mutex_owner() outside of the mutex code itself and went WTF. > > If you

[PATCH] audit: track the owner of the command mutex ourselves

2018-02-20 Thread Paul Moore
From: Paul Moore Evidently the __mutex_owner() function was never intended for use outside the core mutex code, so build a thing locking wrapper around the mutex code which allows us to track the mutex owner. One, arguably positive, side effect is that this allows us to

Re: [PATCH 4.10 070/111] audit: fix auditd/kernel connection state tracking

2018-02-20 Thread Paul Moore
On Tue, Feb 20, 2018 at 10:18 AM, Peter Zijlstra wrote: > On Tue, Feb 20, 2018 at 09:51:08AM -0500, Paul Moore wrote: >> On Tue, Feb 20, 2018 at 9:06 AM, Peter Zijlstra wrote: > >> > It's not at all clear to me what that code does, I just stumbled upon

Re: [PATCH] audit: do not panic kernel on invalid audit parameter

2018-02-20 Thread Paul Moore
On Tue, Feb 20, 2018 at 4:33 PM, Greg Edwards wrote: > If you pass in an invalid audit kernel boot parameter, e.g. 'audit=off', > the kernel panics very early in boot with no output on the console > indicating the problem. I'm guessing the problem is that there was too much