lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Thu, 20 Jun 2024 16:29:05 +0800
From: Zhihao Cheng <chengzhihao1@...wei.com>
To: Chen Ni <nichen@...as.ac.cn>, <richard@....at>, <s.hauer@...gutronix.de>
CC: <linux-mtd@...ts.infradead.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] ubifs: add check for crypto_shash_tfm_digest

在 2024/6/20 16:19, Chen Ni 写道:
> Add check for the return value of crypto_shash_tfm_digest() and return
> the error if it fails in order to catch the error.
> 
> Fixes: 817aa094842d ("ubifs: support offline signed images")
> Signed-off-by: Chen Ni <nichen@...as.ac.cn>
> ---
> Changelog:
> 
> v1 -> v2:
> 
> 1. Update fix tag.
> ---
>   fs/ubifs/master.c | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)

Reviewed-by: Zhihao Cheng <chengzhihao1@...wei.com>
> 
> diff --git a/fs/ubifs/master.c b/fs/ubifs/master.c
> index 7adc37c10b6a..a148760fa49e 100644
> --- a/fs/ubifs/master.c
> +++ b/fs/ubifs/master.c
> @@ -67,10 +67,13 @@ static int mst_node_check_hash(const struct ubifs_info *c,
>   {
>   	u8 calc[UBIFS_MAX_HASH_LEN];
>   	const void *node = mst;
> +	int ret;
>   
> -	crypto_shash_tfm_digest(c->hash_tfm, node + sizeof(struct ubifs_ch),
> +	ret = crypto_shash_tfm_digest(c->hash_tfm, node + sizeof(struct ubifs_ch),
>   				UBIFS_MST_NODE_SZ - sizeof(struct ubifs_ch),
>   				calc);
> +	if (ret)
> +		return ret;
>   
>   	if (ubifs_check_hash(c, expected, calc))
>   		return -EPERM;
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ