mirror of
https://github.com/Dasharo/linux.git
synced 2026-03-06 15:25:10 -08:00
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:
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user