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

2018-02-21 Thread Richard Guy Briggs
On 2018-02-21 19:02, Paul Moore wrote: > On Wed, Feb 21, 2018 at 6:49 PM, Paul Moore wrote: > > On Wed, Feb 21, 2018 at 4:30 AM, Richard Guy Briggs wrote: > >> If there is a memory allocation error when trying to change an audit > >> kernel feature value,

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

2018-02-21 Thread Eric Paris
I think if we went back and looked at history we'd see that all of the code originally had none of the if(!ab) checks after allocation and they just sorta slowly crept in over time. I prefer this pattern, but it used to be the opposite everywhere. On Wed, 2018-02-21 at 19:02 -0500, Paul Moore

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

2018-02-21 Thread Paul Moore
On Wed, Feb 21, 2018 at 6:49 PM, Paul Moore wrote: > On Wed, Feb 21, 2018 at 4:30 AM, 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

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

2018-02-21 Thread Paul Moore
On Wed, Feb 21, 2018 at 4:30 AM, 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 >

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

2018-02-21 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. Passes audit-testsuite. See:

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: