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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180624145548.2259fe38@bbrezillon>
Date:   Sun, 24 Jun 2018 14:55:48 +0200
From:   Boris Brezillon <boris.brezillon@...tlin.com>
To:     Richard Weinberger <richard@....at>
Cc:     linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 09/14] ubi: fastmap: Relax size check

On Wed, 13 Jun 2018 23:23:39 +0200
Richard Weinberger <richard@....at> wrote:

> While attaching via fastmap we verify whether the found fastmap
> is as large as we have computed.
> With preseeded Fastmaps this assumtion can fail since ubinize cannot
> know the total size of the MTD and uses the number if used PEBs for
> the calculation.
> Therefore the found fastmap might be smaller than the kernel expects.
> 
> Signed-off-by: Richard Weinberger <richard@....at>

Reviewed-by: Boris Brezillon <boris.brezillon@...tlin.com>

> ---
>  drivers/mtd/ubi/fastmap.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/ubi/fastmap.c b/drivers/mtd/ubi/fastmap.c
> index 09a9d3a0ccf5..dabeb01af24a 100644
> --- a/drivers/mtd/ubi/fastmap.c
> +++ b/drivers/mtd/ubi/fastmap.c
> @@ -1168,7 +1168,7 @@ int ubi_scan_fastmap(struct ubi_device *ubi, struct ubi_attach_info *ai,
>  	}
>  
>  	fm_size = ubi->leb_size * used_blocks;
> -	if (fm_size != ubi->fm_size) {
> +	if (fm_size > ubi->fm_size) {
>  		ubi_err(ubi, "bad fastmap size: %zi, expected: %zi",
>  			fm_size, ubi->fm_size);
>  		ret = UBI_BAD_FASTMAP;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ