All of lore.kernel.org
 help / color / mirror / Atom feed
From: rentianyue@tj.kylinos.cn
To: Paul Moore <paul@paul-moore.com>,
	Stephen Smalley <stephen.smalley.work@gmail.com>,
	Eric Paris <eparis@parisplace.org>,
	Andreas Gruenbacher <agruenba@redhat.com>
Cc: yangzhao@kylinos.cn, selinux@vger.kernel.org,
	Tianyue Ren <rentianyue@kylinos.cn>
Subject: [PATCH v3 0/1] fix error initialization in inode_doinit_with_dentry()
Date: Fri,  9 Oct 2020 09:36:29 +0800	[thread overview]
Message-ID: <20201009013630.6777-1-rentianyue@tj.kylinos.cn> (raw)
In-Reply-To: <CAHC9VhQTp3Rc_7zM661Rzur0XSuWRWKJJg=CwLPAQo5ABRpS-w@mail.gmail.com>

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
v3: Remove unnecessary "out cycle" that do a needless
    spin lock/unlock cycle when dentry is NULL.

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

 security/selinux/hooks.c | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

-- 
2.28.0




  reply	other threads:[~2020-10-09  1:38 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200927094243.43673-1-rentianyue@tj.kylinos.cn>
2020-09-28  3:23 ` [PATCH v1 0/1] selinux: fix error initialization in inode_doinit_with_dentry() Paul Moore
2020-09-28 13:41   ` Stephen Smalley
     [not found]     ` <tencent_489983C034412A8A6D8DF21D@qq.com>
2020-09-29 12:38       ` Stephen Smalley
     [not found] ` <20200927094243.43673-2-rentianyue@tj.kylinos.cn>
2020-09-29 12:54   ` [PATCH v1 1/1] " Stephen Smalley
2020-09-29 13:31     ` Stephen Smalley
2020-09-29 14:18       ` Stephen Smalley
2020-09-30  1:36         ` [PATCH v2 0/1] " rentianyue
2020-09-30  1:36           ` [PATCH v2 1/1] " rentianyue
2020-09-30 13:49             ` Stephen Smalley
2020-10-01 21:14               ` Paul Moore
2020-10-01 21:45             ` Paul Moore
2020-10-09  1:36               ` rentianyue [this message]
2020-10-09  1:36                 ` [PATCH v3 " rentianyue
2020-10-28  2:17                   ` Paul Moore
2020-11-03 13:13                     ` Sven Schnelle
2020-11-03 17:11                       ` Paul Moore
2020-11-03 19:02                         ` Sven Schnelle
2020-11-04  2:42                           ` Paul Moore
2020-11-04  7:01                             ` Sven Schnelle
2020-11-04 20:40                               ` Paul Moore
2020-10-01 21:41       ` [PATCH v1 " Paul Moore

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201009013630.6777-1-rentianyue@tj.kylinos.cn \
    --to=rentianyue@tj.kylinos.cn \
    --cc=agruenba@redhat.com \
    --cc=eparis@parisplace.org \
    --cc=paul@paul-moore.com \
    --cc=rentianyue@kylinos.cn \
    --cc=selinux@vger.kernel.org \
    --cc=stephen.smalley.work@gmail.com \
    --cc=yangzhao@kylinos.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.