Skip to content

Commit d32d600

Browse files
committed
Merge: CVE-2022-49643: ima: Fix a potential integer overflow in ima_appraise_measurement
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/6429 JIRA: https://issues.redhat.com/browse/RHEL-80802 CVE: CVE-2022-49643 ``` commit d2ee2cf Author: Huaxin Lu <luhuaxin1@huawei.com> Date: Tue Jul 5 13:14:17 2022 +0800 ima: Fix a potential integer overflow in ima_appraise_measurement When the ima-modsig is enabled, the rc passed to evm_verifyxattr() may be negative, which may cause the integer overflow problem. Fixes: 39b0709 ("ima: Implement support for module-style appended signatures") Signed-off-by: Huaxin Lu <luhuaxin1@huawei.com> Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>``` Signed-off-by: CKI Backport Bot <cki-ci-bot+cki-gitlab-backport-bot@redhat.com> --- <small>Created 2025-02-26 11:32 UTC by backporter - [KWF FAQ](https://red.ht/kernel_workflow_doc) - [Slack #team-kernel-workflow](https://redhat-internal.slack.com/archives/C04LRUPMJQ5) - [Source](https://gitlab.com/cki-project/kernel-workflow/-/blob/main/webhook/utils/backporter.py) - [Documentation](https://gitlab.com/cki-project/kernel-workflow/-/blob/main/docs/README.backporter.md) - [Report an issue](https://gitlab.com/cki-project/kernel-workflow/-/issues/new?issue%5Btitle%5D=backporter%20webhook%20issue)</small> Approved-by: Coiby Xu <coxu@redhat.com> Approved-by: Vladis Dronov <vdronov@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Augusto Caringi <acaringi@redhat.com>
2 parents b24c0b7 + af6e006 commit d32d600

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

security/integrity/ima/ima_appraise.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,8 @@ int ima_appraise_measurement(enum ima_hooks func,
408408
goto out;
409409
}
410410

411-
status = evm_verifyxattr(dentry, XATTR_NAME_IMA, xattr_value, rc, iint);
411+
status = evm_verifyxattr(dentry, XATTR_NAME_IMA, xattr_value,
412+
rc < 0 ? 0 : rc, iint);
412413
switch (status) {
413414
case INTEGRITY_PASS:
414415
case INTEGRITY_PASS_IMMUTABLE:

0 commit comments

Comments
 (0)