From: sashiko-bot@kernel.org
Cc: linux-security-module@vger.kernel.org
Subject: Re: [PATCH] evm: check return values of crypto_shash functions
Date: Fri, 09 Oct 2026 11:39:46 +0000 [thread overview]
Message-ID: <sashiko-outbox-165403@kernel.org> (raw)
In-Reply-To: <20261009111212.1516243-1-roberto.sassu@huaweicloud.com>
> From: Daniel Hodges <git@danielhodges.dev>
>
> The crypto_shash_update() and crypto_shash_final() functions can fail
> and return error codes, but their return values were not being checked
> in several places in security/integrity/evm/evm_crypto.c:
>
> - hmac_add_misc() ignored returns from crypto_shash_update() and
> crypto_shash_final()
> - evm_calc_hmac_or_hash() ignored returns from crypto_shash_update()
> - evm_init_hmac() ignored returns from crypto_shash_update()
>
> If these hash operations fail silently, the resulting HMAC could be
> invalid or incomplete, which could weaken the integrity verification
> security that EVM provides.
>
> [ ... ]
> [roberto.sassu@huawei.com: call hmac_add_misc() in evm_calc_hmac_or_hash()
> only if no previous error, to avoid overwriting -ENODATA, and jump to out
> only if hmac_add_misc() fails]
> Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
> Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261009111212.1516243-1-roberto.sassu@huaweicloud.com?part=1
next prev parent reply other threads:[~2026-10-09 11:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-09 11:12 [PATCH] evm: check return values of crypto_shash functions Roberto Sassu
2026-10-09 11:39 ` sashiko-bot [this message]
[not found] <20260131182233.2365157-1-hodgesd@meta.com>
2026-02-04 12:50 ` Roberto Sassu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-165403@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox