Skip to content

Commit d62fdaf

Browse files
committed
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
2 parents 5c76a2e + 57a0ef0 commit d62fdaf

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

security/integrity/evm/evm_crypto.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ static void hmac_add_misc(struct shash_desc *desc, struct inode *inode,
180180
}
181181

182182
/*
183-
* Dump large security xattr values as a continuous ascii hexademical string.
183+
* Dump large security xattr values as a continuous ascii hexadecimal string.
184184
* (pr_debug is limited to 64 bytes.)
185185
*/
186186
static void dump_security_xattr_l(const char *prefix, const void *src,

security/integrity/evm/evm_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ static int is_unsupported_hmac_fs(struct dentry *dentry)
169169
* and compare it against the stored security.evm xattr.
170170
*
171171
* For performance:
172-
* - use the previoulsy retrieved xattr value and length to calculate the
172+
* - use the previously retrieved xattr value and length to calculate the
173173
* HMAC.)
174174
* - cache the verification result in the iint, when available.
175175
*

security/integrity/ima/ima.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,9 @@ struct ima_kexec_hdr {
149149
#define IMA_CHECK_BLACKLIST 0x40000000
150150
#define IMA_VERITY_REQUIRED 0x80000000
151151

152+
/* Exclude non-action flags which are not rule-specific. */
153+
#define IMA_NONACTION_RULE_FLAGS (IMA_NONACTION_FLAGS & ~IMA_NEW_FILE)
154+
152155
#define IMA_DO_MASK (IMA_MEASURE | IMA_APPRAISE | IMA_AUDIT | \
153156
IMA_HASH | IMA_APPRAISE_SUBMASK)
154157
#define IMA_DONE_MASK (IMA_MEASURED | IMA_APPRAISED | IMA_AUDITED | \

security/integrity/ima/ima_main.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -269,10 +269,13 @@ static int process_measurement(struct file *file, const struct cred *cred,
269269
mutex_lock(&iint->mutex);
270270

271271
if (test_and_clear_bit(IMA_CHANGE_ATTR, &iint->atomic_flags))
272-
/* reset appraisal flags if ima_inode_post_setattr was called */
272+
/*
273+
* Reset appraisal flags (action and non-action rule-specific)
274+
* if ima_inode_post_setattr was called.
275+
*/
273276
iint->flags &= ~(IMA_APPRAISE | IMA_APPRAISED |
274277
IMA_APPRAISE_SUBMASK | IMA_APPRAISED_SUBMASK |
275-
IMA_NONACTION_FLAGS);
278+
IMA_NONACTION_RULE_FLAGS);
276279

277280
/*
278281
* Re-evaulate the file if either the xattr has changed or the
@@ -1011,9 +1014,9 @@ int process_buffer_measurement(struct mnt_idmap *idmap,
10111014
}
10121015

10131016
/*
1014-
* Both LSM hooks and auxilary based buffer measurements are
1015-
* based on policy. To avoid code duplication, differentiate
1016-
* between the LSM hooks and auxilary buffer measurements,
1017+
* Both LSM hooks and auxiliary based buffer measurements are
1018+
* based on policy. To avoid code duplication, differentiate
1019+
* between the LSM hooks and auxiliary buffer measurements,
10171020
* retrieving the policy rule information only for the LSM hook
10181021
* buffer measurements.
10191022
*/

0 commit comments

Comments
 (0)