aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/ss
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2021-08-31 12:53:34 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2021-08-31 12:53:34 -0700
commitbefa491ce6954adadb181c464d0318925f18e499 (patch)
tree0d235d244e53bb40bf11d72378d20e9bdcb985a8 /security/selinux/ss
parentMerge tag 'kernel.sys.v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux (diff)
parentselinux: return early for possible NULL audit buffers (diff)
downloadlinux-dev-befa491ce6954adadb181c464d0318925f18e499.tar.xz
linux-dev-befa491ce6954adadb181c464d0318925f18e499.zip
Merge tag 'selinux-pr-20210830' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux
Pull selinux update from Paul Moore: "We've got an unusually small SELinux pull request for v5.15 that consists of only one (?!) patch that is really pretty minor when you look at it. Unsurprisingly it passes all of our tests and merges cleanly on top of your tree right now, please merge this for v5.15" * tag 'selinux-pr-20210830' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: selinux: return early for possible NULL audit buffers
Diffstat (limited to 'security/selinux/ss')
-rw-r--r--security/selinux/ss/services.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c
index d84c77f370dc..e5f1b2757a83 100644
--- a/security/selinux/ss/services.c
+++ b/security/selinux/ss/services.c
@@ -1673,6 +1673,8 @@ static int compute_sid_handle_invalid_context(
if (context_struct_to_string(policydb, newcontext, &n, &nlen))
goto out;
ab = audit_log_start(audit_context(), GFP_ATOMIC, AUDIT_SELINUX_ERR);
+ if (!ab)
+ goto out;
audit_log_format(ab,
"op=security_compute_sid invalid_context=");
/* no need to record the NUL with untrusted strings */