Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6: selinux: Fix a panic in selinux_netlbl_inode_permission()
This commit is contained in:
commit
c742b4bf7a
|
@ -386,11 +386,12 @@ int selinux_netlbl_inode_permission(struct inode *inode, int mask)
|
|||
if (!S_ISSOCK(inode->i_mode) ||
|
||||
((mask & (MAY_WRITE | MAY_APPEND)) == 0))
|
||||
return 0;
|
||||
|
||||
sock = SOCKET_I(inode);
|
||||
sk = sock->sk;
|
||||
if (sk == NULL)
|
||||
return 0;
|
||||
sksec = sk->sk_security;
|
||||
if (sksec->nlbl_state != NLBL_REQUIRE)
|
||||
if (sksec == NULL || sksec->nlbl_state != NLBL_REQUIRE)
|
||||
return 0;
|
||||
|
||||
local_bh_disable();
|
||||
|
|
Loading…
Reference in a new issue