lkml.org 
[lkml]   [2021]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2] lsm_audit,selinux: return early for possible NULL audit buffers
2021년 7월 15일 (목) 오전 4:26, Paul Moore <paul@paul-moore.com>님이 작성:
>
> On Tue, Jul 13, 2021 at 8:11 PM Austin Kim <austindh.kim@gmail.com> wrote:
> >
> > From: Austin Kim <austin.kim@lge.com>
> >
> > audit_log_start() may return NULL in below cases:
> >
> > - when audit is not initialized.
> > - when audit backlog limit exceeds.
> >
> > After the call to audit_log_start() is made and then possible NULL audit
> > buffer argument is passed to audit_log_*() functions,
> > audit_log_*() functions return immediately in case of a NULL audit buffer
> > argument.
> >
> > But it is optimal to return early when audit_log_start() returns NULL,
> > because it is not necessary for audit_log_*() functions to be called with
> > NULL audit buffer argument.
> >
> > So add exception handling for possible NULL audit buffers where
> > return value can be handled from callers.
> >
> > Signed-off-by: Austin Kim <austin.kim@lge.com>
> > ---
> > security/selinux/hooks.c | 4 ++++
> > security/selinux/ss/services.c | 2 ++
> > 2 files changed, 6 insertions(+)
>
> Merged into selinux/next, thank you!

Great, thanks for review and feedback.

Thanks,
Austin Kim

>
> --
> paul moore
> www.paul-moore.com

\
 
 \ /
  Last update: 2021-07-14 23:46    [W:0.067 / U:0.960 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site