integrity-v6.14-fix
-----BEGIN PGP SIGNATURE----- iIoEABYKADIWIQQdXVVFGN5XqKr1Hj7LwZzRsCrn5QUCZ78LSBQcem9oYXJAbGlu dXguaWJtLmNvbQAKCRDLwZzRsCrn5X1kAQCsB9LO0NX+DhZILASeSJfzjAkY0cGY jzQ3eq3keLkXrQD/RjeKD9e/qjBrXX0C4qbr9e8+JYuzY22o911bEiK67wg= =lOQV -----END PGP SIGNATURE----- Merge tag 'integrity-v6.14-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity Pull integrity fixes from Mimi Zohar: "One bugfix and one spelling cleanup. The bug fix restores a performance improvement" * tag 'integrity-v6.14-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity: ima: Reset IMA_NONACTION_RULE_FLAGS after post_setattr integrity: fix typos and spelling errors
This commit is contained in:
commit
d62fdaf51b
4 changed files with 13 additions and 7 deletions
|
@ -180,7 +180,7 @@ static void hmac_add_misc(struct shash_desc *desc, struct inode *inode,
|
|||
}
|
||||
|
||||
/*
|
||||
* Dump large security xattr values as a continuous ascii hexademical string.
|
||||
* Dump large security xattr values as a continuous ascii hexadecimal string.
|
||||
* (pr_debug is limited to 64 bytes.)
|
||||
*/
|
||||
static void dump_security_xattr_l(const char *prefix, const void *src,
|
||||
|
|
|
@ -169,7 +169,7 @@ static int is_unsupported_hmac_fs(struct dentry *dentry)
|
|||
* and compare it against the stored security.evm xattr.
|
||||
*
|
||||
* For performance:
|
||||
* - use the previoulsy retrieved xattr value and length to calculate the
|
||||
* - use the previously retrieved xattr value and length to calculate the
|
||||
* HMAC.)
|
||||
* - cache the verification result in the iint, when available.
|
||||
*
|
||||
|
|
|
@ -149,6 +149,9 @@ struct ima_kexec_hdr {
|
|||
#define IMA_CHECK_BLACKLIST 0x40000000
|
||||
#define IMA_VERITY_REQUIRED 0x80000000
|
||||
|
||||
/* Exclude non-action flags which are not rule-specific. */
|
||||
#define IMA_NONACTION_RULE_FLAGS (IMA_NONACTION_FLAGS & ~IMA_NEW_FILE)
|
||||
|
||||
#define IMA_DO_MASK (IMA_MEASURE | IMA_APPRAISE | IMA_AUDIT | \
|
||||
IMA_HASH | IMA_APPRAISE_SUBMASK)
|
||||
#define IMA_DONE_MASK (IMA_MEASURED | IMA_APPRAISED | IMA_AUDITED | \
|
||||
|
|
|
@ -269,10 +269,13 @@ static int process_measurement(struct file *file, const struct cred *cred,
|
|||
mutex_lock(&iint->mutex);
|
||||
|
||||
if (test_and_clear_bit(IMA_CHANGE_ATTR, &iint->atomic_flags))
|
||||
/* reset appraisal flags if ima_inode_post_setattr was called */
|
||||
/*
|
||||
* Reset appraisal flags (action and non-action rule-specific)
|
||||
* if ima_inode_post_setattr was called.
|
||||
*/
|
||||
iint->flags &= ~(IMA_APPRAISE | IMA_APPRAISED |
|
||||
IMA_APPRAISE_SUBMASK | IMA_APPRAISED_SUBMASK |
|
||||
IMA_NONACTION_FLAGS);
|
||||
IMA_NONACTION_RULE_FLAGS);
|
||||
|
||||
/*
|
||||
* Re-evaulate the file if either the xattr has changed or the
|
||||
|
@ -1011,9 +1014,9 @@ int process_buffer_measurement(struct mnt_idmap *idmap,
|
|||
}
|
||||
|
||||
/*
|
||||
* Both LSM hooks and auxilary based buffer measurements are
|
||||
* based on policy. To avoid code duplication, differentiate
|
||||
* between the LSM hooks and auxilary buffer measurements,
|
||||
* Both LSM hooks and auxiliary based buffer measurements are
|
||||
* based on policy. To avoid code duplication, differentiate
|
||||
* between the LSM hooks and auxiliary buffer measurements,
|
||||
* retrieving the policy rule information only for the LSM hook
|
||||
* buffer measurements.
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue