evm: Implement per signature type decision in security_inode_copy_up_xattr
authorStefan Berger <stefanb@linux.ibm.com>
Fri, 23 Feb 2024 17:25:06 +0000 (12:25 -0500)
committerMimi Zohar <zohar@linux.ibm.com>
Tue, 9 Apr 2024 21:14:57 +0000 (17:14 -0400)
commitf2b3fc42f6ce19524d8ecaf9f878456ed8c50914
tree1233c3acc4d22f7621f4cd577716932ac0f99c5d
parent3253804773c0613a1bad5bfea2edf172b760d8b6
evm: Implement per signature type decision in security_inode_copy_up_xattr

To support "portable and immutable signatures" on otherwise unsupported
filesystems, determine the EVM signature type by the content of a file's
xattr. If the file has the appropriate signature type then allow it to be
copied up. All other signature types are discarded as before.

"Portable and immutable" EVM signatures can be copied up by stacked file-
system since the metadata their signature covers does not include file-
system-specific data such as a file's inode number, generation, and UUID.

Co-developed-by: Mimi Zohar <zohar@linux.ibm.com>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
security/integrity/evm/evm_main.c