From: Al Viro <viro@ZenIV.linux.org.uk>
To: Casey Schaufler <casey@schaufler-ca.com>
Cc: Seung-Woo Kim <sw0312.kim@samsung.com>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
jh80.chung@sungmsung.com, cw00.choi@samsung.com,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [BUG] Panic when systemd boot do mkdir on tmpfs mounted path with smack enabled environment
Date: Fri, 27 May 2016 20:37:41 +0100 [thread overview]
Message-ID: <20160527193741.GR14480@ZenIV.linux.org.uk> (raw)
In-Reply-To: <9f2efc48-1778-d850-8bc3-a8ce77d6cdd7@schaufler-ca.com>
On Fri, May 27, 2016 at 12:03:37PM -0700, Casey Schaufler wrote:
> I haven't actually seen the problem, but I've been having
> real trouble getting a systemd configuration working properly.
> The quickest validation will probably be coming from Seung-Woo Kim,
> who reported the issue initially. I am working to verify both the
> problem and the fix.
To trigger it you need to end up in smack_d_instantiate() for a directory
that had SMK_INODE_CHANGED set in smack_inode_init_security(). IOW,
smk_inode_transmutable() being true for its parent and smk_access_entry()
for that parent returning something with MAY_TRANSMUTE in it.
I'm not familiar enough with smack guts to put together a reproducer,
but *ANY* call of ->setxattr() from smack_d_instantiate() on xattr-supporting
filesystem will blow up in the mainline. At that point dentry still has
NULL ->d_inode, so ->setxattr() instances are going to oops as soon as they
try to do anything with the inode. All it takes is getting to that method
call.
prev parent reply other threads:[~2016-05-27 19:37 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-27 11:09 [BUG] Panic when systemd boot do mkdir on tmpfs mounted path with smack enabled environment Seung-Woo Kim
2016-05-27 15:11 ` Al Viro
2016-05-27 18:51 ` Al Viro
2016-05-27 19:01 ` Linus Torvalds
2016-05-27 19:26 ` Al Viro
2016-05-27 19:34 ` Linus Torvalds
2016-05-27 19:43 ` Al Viro
2016-05-27 19:48 ` Linus Torvalds
2016-05-27 20:24 ` Al Viro
2016-05-27 22:44 ` Casey Schaufler
2016-05-30 1:43 ` Seung-Woo Kim
2016-05-27 19:03 ` Casey Schaufler
2016-05-27 19:37 ` Al Viro [this message]
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=20160527193741.GR14480@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=casey@schaufler-ca.com \
--cc=cw00.choi@samsung.com \
--cc=jh80.chung@sungmsung.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sw0312.kim@samsung.com \
--cc=torvalds@linux-foundation.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).