Merge branch 'verify-evm-portable-sig-v2' into next-integrity
authorMimi Zohar <zohar@linux.ibm.com>
Thu, 3 Jun 2021 14:12:36 +0000 (10:12 -0400)
committerMimi Zohar <zohar@linux.ibm.com>
Thu, 3 Jun 2021 14:12:36 +0000 (10:12 -0400)
commitdc0983f2f9b6a9a9abe575a7ae15f873da694887
tree8310bbf6e53319a037ced2757fa30d4243338536
parent5a25d8ceb8611c06797b74e22d04af2b9fefd130
parentd721c15fd519c08819fbc6de39b713e2ed1d9894
Merge branch 'verify-evm-portable-sig-v2' into next-integrity

From the cover letter:

The recent patch set 'evm: Improve usability of portable signatures' added
the possibility to include EVM portable signatures in the IMA measurement
list.

However, the information necessary to verify the signature were not
included in the IMA measurement list. This patch set introduces new
template fields to accomplish this goal:

- 'iuid': the inode UID;
- 'igid': the inode GID;
- 'imode': the inode mode;
- 'xattrnames': a list of xattr names (separated by |), only if the xattr is
  present;
- 'xattrlengths': a list of xattr lengths (u32), only if the xattr is present;
- 'xattrvalues': a list of xattr values;

Patch 1 adds an helper function to show integers in the measurement list.
Patches 2, 3 and 5 introduce new template fields. Patch 4 make it possible
to verify EVM portable signatures which protect xattrs belonging to LSMs
not enabled in the target platform. Patch 6 introduces the new IMA template
evm-sig. Patch 7 fixes a small issue in evm_write_xattrs() when audit is
not enabled.

Link: https://lore.kernel.org/linux-integrity/20210528073812.407936-1-roberto.sassu@huawei.com/