]> git.baikalelectronics.ru Git - kernel.git/commit
ima: Fix a potential integer overflow in ima_appraise_measurement
authorHuaxin Lu <luhuaxin1@huawei.com>
Tue, 5 Jul 2022 05:14:17 +0000 (13:14 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 Jul 2022 19:24:18 +0000 (21:24 +0200)
commit6596db1535bfb676537bfe258f887848df5e89f0
tree91a6a6fb6b7984807c0c9a196f336704de4bd7cb
parentb1da8b725643320ba87754735f1c6908ca6af648
ima: Fix a potential integer overflow in ima_appraise_measurement

[ Upstream commit abc94b180a384113f203dbabb7367e563a57cac5 ]

When the ima-modsig is enabled, the rc passed to evm_verifyxattr() may be
negative, which may cause the integer overflow problem.

Fixes: d4a23e1f9d4a ("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: Sasha Levin <sashal@kernel.org>
security/integrity/ima/ima_appraise.c