3 Contact: Mimi Zohar <zohar@us.ibm.com>
5 EVM protects a file's security extended attributes(xattrs)
6 against integrity attacks. The initial method maintains an
7 HMAC-sha1 value across the extended attributes, storing the
8 value as the extended attribute 'security.evm'.
10 EVM supports two classes of security.evm. The first is
11 an HMAC-sha1 generated locally with a
12 trusted/encrypted key stored in the Kernel Key
13 Retention System. The second is a digital signature
14 generated either locally or remotely using an
15 asymmetric key. These keys are loaded onto root's
16 keyring using keyctl, and EVM is then enabled by
17 echoing a value to <securityfs>/evm made up of the
21 0 Enable HMAC validation and creation
22 1 Enable digital signature validation
23 2 Permit modification of EVM-protected metadata at
24 runtime. Not supported if HMAC validation and
26 31 Disable further runtime modification of EVM policy
30 echo 1 ><securityfs>/evm
32 will enable HMAC validation and creation
34 echo 0x80000003 ><securityfs>/evm
36 will enable HMAC and digital signature validation and
37 HMAC creation and disable all further modification of policy.
39 echo 0x80000006 ><securityfs>/evm
41 will enable digital signature validation, permit
42 modification of EVM-protected metadata and
43 disable all further modification of policy
45 Note that once a key has been loaded, it will no longer be
46 possible to enable metadata modification.
48 Until key loading has been signaled EVM can not create
49 or validate the 'security.evm' xattr, but returns
50 INTEGRITY_UNKNOWN. Loading keys and signaling EVM
51 should be done as early as possible. Normally this is
52 done in the initramfs, which has already been measured
53 as part of the trusted boot. For more information on
54 creating and loading existing trusted/encrypted keys,
56 Documentation/security/keys/trusted-encrypted.rst. Both
57 dracut (via 97masterkey and 98integrity) and systemd (via
58 core/ima-setup) have support for loading keys at boot
61 What: security/integrity/evm/evm_xattrs
63 Contact: Matthew Garrett <mjg59@google.com>
65 Shows the set of extended attributes used to calculate or
66 validate the EVM signature, and allows additional attributes
67 to be added at runtime. Any signatures generated after
68 additional attributes are added (and on files posessing those
69 additional attributes) will only be valid if the same
70 additional attributes are configured on system boot. Writing
71 a single period (.) will lock the xattr list from any further