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] [thread-next>] [day] [month] [year] [list]
Message-ID: <e26aea85-988c-17a1-7fff-c14387ca4b57@huawei.com>
Date: Sat, 16 Nov 2024 10:02:22 +0800
From: Zhihao Cheng <chengzhihao1@...wei.com>
To: Antonio Quartulli <antonio@...delbit.com>, <linux-mtd@...ts.infradead.org>
CC: Richard Weinberger <richard@....at>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ubifs: fix uninitialized variable usage

在 2024/11/16 6:26, Antonio Quartulli 写道:
> In ubifs_jnl_write_inode(), when an inode cannot be deleted
> due to too many xattrs, err is passed to ubifs_ro_mode()
> uninitialized, thus leading to bogus error reporting.
> 
> Fix this case by passing -EPERM, which is the same value that
> ubifs_jnl_write_inode() is going to return to the caller.
> 
> This fixes 1 UNINIT issue reported by Coverity
> Report: CID 1601860: Uninitialized scalar variable (UNINIT)
> 
> Cc: Richard Weinberger <richard@....at>
> Cc: Zhihao Cheng <chengzhihao1@...wei.com>
> Cc: linux-kernel@...r.kernel.org (open list)
> Signed-off-by: Antonio Quartulli <antonio@...delbit.com>
> ---
>   fs/ubifs/journal.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Hi Antonio, thanks for the patch. Nathan has sent a patch to fix it.
https://lore.kernel.org/linux-mtd/b560f413-70f1-8ebb-7403-34591658ca86@huawei.com/T/#t
> 
> diff --git a/fs/ubifs/journal.c b/fs/ubifs/journal.c
> index 8e98be642371..5eedf511880c 100644
> --- a/fs/ubifs/journal.c
> +++ b/fs/ubifs/journal.c
> @@ -983,7 +983,7 @@ int ubifs_jnl_write_inode(struct ubifs_info *c, const struct inode *inode)
>   
>   	if (kill_xattrs && ui->xattr_cnt > ubifs_xattr_max_cnt(c)) {
>   		ubifs_err(c, "Cannot delete inode, it has too much xattrs!");
> -		ubifs_ro_mode(c, err);
> +		ubifs_ro_mode(c, -EPERM);
>   		return -EPERM;
>   	}
>   
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ