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]
Message-ID: <20140820004158.GA4650@arch.cereza>
Date:	Tue, 19 Aug 2014 21:41:58 -0300
From:	Ezequiel Garcia <ezequiel.garcia@...e-electrons.com>
To:	Colin King <colin.king@...onical.com>
Cc:	Artem Bityutskiy <dedekind1@...il.com>,
	David Woodhouse <dwmw2@...radead.org>,
	Brian Norris <computersforpeace@...il.com>,
	linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] UBI: block: fix dereference on uninitialized dev

Hi Colin,

Thanks for the fix.

On 16 Aug 05:49 PM, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.com>
> 
> commit 4df38926f337 ("UBI: block: Avoid disk size integer overflow")
> introduced a dereference on dev (which is not initialized at that
> point) when printing a warning message.  Remove the reference to
> the dev's disk_name.
> 
> Found by cppcheck:
>  [drivers/mtd/ubi/block.c:509]: (error) Uninitialized variable: dev
> 
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
> ---
>  drivers/mtd/ubi/block.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mtd/ubi/block.c b/drivers/mtd/ubi/block.c
> index 33c6495..944bdbd 100644
> --- a/drivers/mtd/ubi/block.c
> +++ b/drivers/mtd/ubi/block.c
> @@ -505,8 +505,8 @@ static int ubiblock_resize(struct ubi_volume_info *vi)
>  	u64 disk_capacity = ((u64)vi->size * vi->usable_leb_size) >> 9;
>  
>  	if ((sector_t)disk_capacity != disk_capacity) {
> -		ubi_warn("%s: the volume is too big, cannot resize (%d LEBs)",
> -			 dev->gd->disk_name, vi->size);
> +		ubi_warn("block: the volume is too big, cannot resize (%d LEBs)",
> +			vi->size);

Do you think you can resend this adding the name of the volume to the warning?

>  		return -EFBIG;
>  	}

-- 
Ezequiel GarcĂ­a, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ