commit | 0a5af3b257124c0c10ecf78888c60bcf41e0afd9 | [log] [tgz] |
---|---|---|
author | Linux Build Service Account <lnxbuild@localhost> | Wed Mar 19 01:41:32 2014 -0700 |
committer | Gerrit - the friendly Code Review server <code-review@localhost> | Wed Mar 19 01:41:31 2014 -0700 |
tree | 8c675327b9ac83dd0d2ada3045a895a16eff1247 | |
parent | fb5f131976f5febf3c148ab221954f0f2d96c37c [diff] | |
parent | 90280655c95b8ee5537c711521ba0da6616d80d7 [diff] |
Merge "selinux: Fix Kernel panic due to NULL pointer dereference"
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index b28b7eb..c868a74 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c
@@ -3816,6 +3816,11 @@ struct lsm_network_audit net = {0,}; u32 tsid = task_sid(task); + if (unlikely(!sksec)) { + pr_warn("SELinux: sksec is NULL, socket is already freed\n"); + return -EINVAL; + } + if (sksec->sid == SECINITSID_KERNEL) return 0;