• Mimi Zohar's avatar
    ima: support fs-verity file digest based version 3 signatures · 398c42e2
    Mimi Zohar authored
    IMA may verify a file's integrity against a "good" value stored in the
    'security.ima' xattr or as an appended signature, based on policy.  When
    the "good value" is stored in the xattr, the xattr may contain a file
    hash or signature.  In either case, the "good" value is preceded by a
    header.  The first byte of the xattr header indicates the type of data
    - hash, signature - stored in the xattr.  To support storing fs-verity
    signatures in the 'security.ima' xattr requires further differentiating
    the fs-verity signature from the existing IMA signature.
    
    In addition the signatures stored in 'security.ima' xattr, need to be
    disambiguated.  Instead of directly signing the fs-verity digest, a new
    signature format version 3 is defined as the hash of the ima_file_id
    structure, which identifies the type of signature and the digest.
    
    The IMA policy defines "which" files are to be measured, verified, and/or
    audited.  For those files being verified, the poli...
    398c42e2
ima_template_lib.c 19.2 KB