mbox series

[v2,0/1] selinux: fix error initialization in inode_doinit_with_dentry()

Message ID 20200930013146.48339-1-rentianyue@tj.kylinos.cn (mailing list archive)
Headers show
Series selinux: fix error initialization in inode_doinit_with_dentry() | expand

Message

rentianyue@tj.kylinos.cn Sept. 30, 2020, 1:31 a.m. UTC
From: Tianyue Ren <rentianyue@kylinos.cn>

I think there is a error initialization for isec->sid when the dentry is NULL,
when we do "remount -o rw,remount ${rootmnt}" action before selinux policy loading.It's
leading kernel getting wrong security label "unlabeled_t" when the userspace access
files such as /etc/fstab.

This patch lets the label be invalid before it's initializated correctly.

v2: Modify the patch description

Tianyue Ren (1):
  selinux: fix error initialization in inode_doinit_with_dentry()

 security/selinux/hooks.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)