linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Serge E. Hallyn" <serge@hallyn.com>
To: Mimi Zohar <zohar@linux.vnet.ibm.com>
Cc: linux-security-module@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	James Morris <jmorris@namei.org>,
	David Safford <safford@watson.ibm.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Greg KH <greg@kroah.com>,
	Dmitry Kasatkin <dmitry.s.kasatkin@gmail.com>,
	Mimi Zohar <zohar@us.ibm.com>
Subject: Re: [PATCH v6 03/20] evm: re-release
Date: Thu, 2 Jun 2011 17:38:03 -0500	[thread overview]
Message-ID: <20110602223803.GA23700@mail.hallyn.com> (raw)
In-Reply-To: <1307017423-15093-4-git-send-email-zohar@linux.vnet.ibm.com>

Quoting Mimi Zohar (zohar@linux.vnet.ibm.com):
> EVM protects a file's security extended attributes(xattrs) against integrity
> attacks.  This patchset provides the framework and an initial method.  The
> initial method maintains an HMAC-sha1 value across the security extended
> attributes, storing the HMAC value as the extended attribute 'security.evm'.
> Other methods of validating the integrity of a file's metadata will be posted
> separately (eg. EVM-digital-signatures).
> 
> While this patchset does authenticate the security xattrs, and
> cryptographically binds them to the inode, coming extensions will bind other
> directory and inode metadata for more complete protection.  To help simplify
> the review and upstreaming process, each extension will be posted separately
> (eg. IMA-appraisal, IMA-appraisal-directory).  For a general overview of the
> proposed Linux integrity subsystem, refer to Dave Safford's whitepaper:
> http://downloads.sf.net/project/linux-ima/linux-ima/Integrity_overview.pdf.
> 
> EVM depends on the Kernel Key Retention System to provide it with a
> trusted/encrypted key for the HMAC-sha1 operation. The key is loaded onto the
> root's keyring using keyctl.  Until EVM receives notification that the key has
> been successfully loaded onto the keyring (echo 1 > <securityfs>/evm), EVM can
> not create or validate the 'security.evm' xattr, but returns INTEGRITY_UNKNOWN.
> Loading the key and signaling EVM should be done as early as possible. Normally
> this is done in the initramfs, which has already been measured as part of the
> trusted boot.  For more information on creating and loading existing
> trusted/encrypted keys, refer to Documentation/keys-trusted-encrypted.txt.
> 
> Based on the LSMs enabled, the set of EVM protected security xattrs is defined
> at compile.  EVM adds the following three calls to the existing security hooks:
> evm_inode_setxattr(), evm_inode_post_setxattr(), and evm_inode_removexattr.  To
> initialize and update the 'security.evm' extended attribute, EVM defines three
> calls: evm_inode_post_init(), evm_inode_post_setattr() and
> evm_inode_post_removexattr() hooks.  To verify the integrity of a security
> xattr, EVM exports evm_verifyxattr().
> 
> Changelog v6: (based on Serge Hallyn's review)
> - fix URL in patch description

It's still wrong in Documentation/ABI/testing/evm...

> - remove evm_hmac_size definition
> - use SHA1_DIGEST_SIZE (removed both MAX_DIGEST_SIZE and evm_hmac_size)
> - moved linux include before other includes
> - test for crypto_hash_setkey failure
> - fail earlier for invalid key
> - clear entire encrypted key, even on failure
> - check xattr name length before comparing xattr names

The rest looks good, thanks

Acked-by: Serge Hallyn <serge.hallyn@canonical.com>

-serge

  reply	other threads:[~2011-06-02 22:38 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-02 12:23 [PATCH v6 00/20] EVM Mimi Zohar
2011-06-02 12:23 ` [PATCH v6 01/20] integrity: move ima inode integrity data management Mimi Zohar
2011-06-02 12:23 ` [PATCH v6 02/20] xattr: define vfs_getxattr_alloc and vfs_xattr_cmp Mimi Zohar
2011-06-02 12:23 ` [PATCH v6 03/20] evm: re-release Mimi Zohar
2011-06-02 22:38   ` Serge E. Hallyn [this message]
2011-06-02 12:23 ` [PATCH v6 04/20] evm: add support for different security.evm data types Mimi Zohar
2011-06-02 22:50   ` Serge E. Hallyn
2011-06-03 12:31     ` Mimi Zohar
2011-06-02 12:23 ` [PATCH v6 05/20] security: imbed evm calls in security hooks Mimi Zohar
2011-06-02 12:23 ` [PATCH v6 06/20] evm: evm_inode_post_removexattr Mimi Zohar
2011-06-02 12:23 ` [PATCH v6 07/20] evm: imbed evm_inode_post_setattr Mimi Zohar
2011-06-02 12:23 ` [PATCH v6 08/20] evm: evm_inode_post_init Mimi Zohar
2011-06-03  2:21   ` Dave Chinner
2011-06-03  5:06     ` Mimi Zohar
2011-06-04 23:50       ` Dave Chinner
2011-06-05  2:46         ` Mimi Zohar
2011-06-07 15:56           ` Casey Schaufler
2011-06-02 12:23 ` [PATCH v6 09/20] fs: add evm_inode_post_init calls Mimi Zohar
2011-06-02 12:23 ` [PATCH v6 10/20] evm: crypto hash replaced by shash Mimi Zohar
2011-06-02 12:23 ` [PATCH v6 11/20] evm: add evm_inode_post_init call in btrfs Mimi Zohar
2011-06-02 12:23 ` [PATCH v6 12/20] evm: add evm_inode_post_init call in gfs2 Mimi Zohar
2011-06-02 12:23 ` [PATCH v6 13/20] evm: add evm_inode_post_init call in jffs2 Mimi Zohar
2011-06-02 12:23 ` [PATCH v6 14/20] evm: add evm_inode_post_init call in jfs Mimi Zohar
2011-06-02 12:23 ` [PATCH v6 15/20] evm: add evm_inode_post_init call in xfs Mimi Zohar
2011-06-02 12:23 ` [PATCH v6 16/20] evm: additional parameter to pass integrity cache entry 'iint' Mimi Zohar
2011-06-02 12:23 ` [PATCH v6 17/20] evm: evm_verify_hmac must not return INTEGRITY_UNKNOWN Mimi Zohar
2011-06-02 12:23 ` [PATCH v6 18/20] evm: replace hmac_status with evm_status Mimi Zohar
2011-06-02 12:23 ` [PATCH v6 19/20] evm: permit only valid security.evm xattrs to be updated Mimi Zohar
2011-06-02 12:23 ` [PATCH v6 20/20] evm: add evm_inode_setattr to prevent updating an invalid security.evm Mimi Zohar

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=20110602223803.GA23700@mail.hallyn.com \
    --to=serge@hallyn.com \
    --cc=akpm@linux-foundation.org \
    --cc=dmitry.s.kasatkin@gmail.com \
    --cc=greg@kroah.com \
    --cc=jmorris@namei.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=safford@watson.ibm.com \
    --cc=zohar@linux.vnet.ibm.com \
    --cc=zohar@us.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).