From: Vivek Goyal <vgoyal@redhat.com>
To: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
Cc: linux-security-module@vger.kernel.org,
linux-kernel@vger.kernel.org, casey@schaufler-ca.com,
zohar@linux.vnet.ibm.com, viro@zeniv.linux.org.uk,
linux-fsdevel@vger.kernel.org
Subject: Re: [RFC 1/1] xattr: provide integrity. namespace to read real values
Date: Thu, 14 Feb 2013 15:05:57 -0500 [thread overview]
Message-ID: <20130214200557.GF16671@redhat.com> (raw)
In-Reply-To: <959cfd74266e82f72e5879c6c8b798d76f6cad31.1360746454.git.dmitry.kasatkin@intel.com>
On Wed, Feb 13, 2013 at 11:07:49AM +0200, Dmitry Kasatkin wrote:
> User space tools use getxattr() system call to read values of extended
> attributes. getxattr() system call uses vfs_getattr(), which for "security."
> namespace might get a value of the xattr indirectly from LSM via calling
> xattr_getsecurity(). For that reason value set by setxattr and read by getxattr
> might differ.
>
> Here is an example of SMACK label, which shows that set and read values are
> different:
>
> setfattr -n security.SMACK64 -v "hello world" foo
> getfattr -n security.SMACK64 foo
> # file: foo
> security.SMACK64="hello"
>
> EVM uses vfs_getxattr_alloc(), which directly reads xattr values from the file
> system. When performing the file system labeling with digital signatures, it is
> necessary to read real xattr values in order to generate the correct signatures.
>
> This patch adds the virtual "integrity." name space, which allows to bypass
> calling LSM and read real extended attribute values.
>
> getfattr -e text -n integrity.SMACK64 foo
> # file: foo
> integrity.SMACK64="hello world"
Without knowing anything about xattr or LSM, to me it is odd that I
write an xattr using name "security.SMACK64" and read back the same
attribute using different name "integrity.SMACK64".
Thanks
Vivek
next prev parent reply other threads:[~2013-02-14 20:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-13 9:07 [RFC 1/1] xattr: provide integrity. namespace to read real values Dmitry Kasatkin
2013-02-14 7:48 ` Kasatkin, Dmitry
2013-02-14 20:05 ` Vivek Goyal [this message]
2013-02-25 12:25 ` Kasatkin, Dmitry
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=20130214200557.GF16671@redhat.com \
--to=vgoyal@redhat.com \
--cc=casey@schaufler-ca.com \
--cc=dmitry.kasatkin@intel.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
--cc=zohar@linux.vnet.ibm.com \
/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).