brintos

brintos / linux-shallow public Read only

0
0
Text · 3.6 KiB · 44750a9 Raw
109 lines · plain
1What:		/sys/kernel/security/evm2What:		/sys/kernel/security/*/evm3Date:		March 20114Contact:	Mimi Zohar <zohar@us.ibm.com>5Description:6		EVM protects a file's security extended attributes(xattrs)7		against integrity attacks. The initial method maintains an8		HMAC-sha1 value across the extended attributes, storing the9		value as the extended attribute 'security.evm'.10 11		EVM supports two classes of security.evm. The first is12		an HMAC-sha1 generated locally with a13		trusted/encrypted key stored in the Kernel Key14		Retention System. The second is a digital signature15		generated either locally or remotely using an16		asymmetric key. These keys are loaded onto root's17		keyring using keyctl, and EVM is then enabled by18		echoing a value to <securityfs>/evm made up of the19		following bits:20 21		===	  ==================================================22		Bit	  Effect23		===	  ==================================================24		0	  Enable HMAC validation and creation25		1	  Enable digital signature validation26		2	  Permit modification of EVM-protected metadata at27			  runtime. Not supported if HMAC validation and28			  creation is enabled (deprecated).29		31	  Disable further runtime modification of EVM policy30		===	  ==================================================31 32		For example::33 34		  echo 1 ><securityfs>/evm35 36		will enable HMAC validation and creation37 38		::39 40		  echo 0x80000003 ><securityfs>/evm41 42		will enable HMAC and digital signature validation and43		HMAC creation and disable all further modification of policy.44 45		::46 47		  echo 0x80000006 ><securityfs>/evm48 49		will enable digital signature validation, permit50		modification of EVM-protected metadata and51		disable all further modification of policy. This option is now52		deprecated in favor of::53 54		  echo 0x80000002 ><securityfs>/evm55 56		as the outstanding issues that prevent the usage of EVM portable57		signatures have been solved.58 59		Echoing a value is additive, the new value is added to the60		existing initialization flags.61 62		For example, after::63 64		  echo 2 ><securityfs>/evm65 66		another echo can be performed::67 68		  echo 1 ><securityfs>/evm69 70		and the resulting value will be 3.71 72		Note that once an HMAC key has been loaded, it will no longer73		be possible to enable metadata modification. Signaling that an74		HMAC key has been loaded will clear the corresponding flag.75		For example, if the current value is 6 (2 and 4 set)::76 77		  echo 1 ><securityfs>/evm78 79		will set the new value to 3 (4 cleared).80 81		Loading an HMAC key is the only way to disable metadata82		modification.83 84		Until key loading has been signaled EVM can not create85		or validate the 'security.evm' xattr, but returns86		INTEGRITY_UNKNOWN.  Loading keys and signaling EVM87		should be done as early as possible.  Normally this is88		done in the initramfs, which has already been measured89		as part of the trusted boot.  For more information on90		creating and loading existing trusted/encrypted keys,91		refer to:92		Documentation/security/keys/trusted-encrypted.rst. Both93		dracut (via 97masterkey and 98integrity) and systemd (via94		core/ima-setup) have support for loading keys at boot95		time.96 97What:		/sys/kernel/security/*/evm/evm_xattrs98Date:		April 201899Contact:	Matthew Garrett <mjg59@google.com>100Description:101		Shows the set of extended attributes used to calculate or102		validate the EVM signature, and allows additional attributes103		to be added at runtime. Any signatures generated after104		additional attributes are added (and on files possessing those105		additional attributes) will only be valid if the same106		additional attributes are configured on system boot. Writing107		a single period (.) will lock the xattr list from any further108		modification.109