Home
last modified time | relevance | path

Searched hist:"893 c47d1964f5c9b00c5468f2cd1a1e9351fbb6a" (Results 1 – 2 of 2) sorted by relevance

/openbmc/linux/security/selinux/ss/
H A Dservices.cdiff 893c47d1964f5c9b00c5468f2cd1a1e9351fbb6a Tue Jul 13 19:11:27 CDT 2021 Austin Kim <austin.kim@lge.com> selinux: return early for possible NULL audit buffers

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>
[PM: tweak subject line]
Signed-off-by: Paul Moore <paul@paul-moore.com>
/openbmc/linux/security/selinux/
H A Dhooks.cdiff 893c47d1964f5c9b00c5468f2cd1a1e9351fbb6a Tue Jul 13 19:11:27 CDT 2021 Austin Kim <austin.kim@lge.com> selinux: return early for possible NULL audit buffers

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>
[PM: tweak subject line]
Signed-off-by: Paul Moore <paul@paul-moore.com>