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, 15 Nov 2012 15:45:04 +0200
From:	Artem Bityutskiy <dedekind1@...il.com>
To:	Huang Shijie <b32955@...escale.com>
Cc:	dwmw2@...radead.org, linux-mtd@...ts.infradead.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mtd: cmdlinepart: fix the overflow of big mtd partitions

On Thu, 2012-11-01 at 13:58 +0800, Huang Shijie wrote:
> When the kernel parses the following cmdline
> 
> 	#mtdparts=gpmi-nand:16m(boot),16m(kernel),1g(home),4g(test),-(usr)
> 
> for a big nand chip Micron MT29F64G08AFAAAWP(8GB), we got the following wrong
> result:
> 
> 	.............................................
> 		"mtd: partition size too small (0)"
> 	.............................................
> 
> We can not get any partition.
> 
> The "4g(test)" partition triggers a overflow of the "size". The memparse()
> returns 4g to the "size", but the size is "unsigned long" type, so a overflow
> occurs, the "size" becomes zero in the end.
> 
> This patch changes the "size"/"offset" to "unsigned long long" type,
> and replaces the UINT_MAX with ULLONG_MAX for macros SIZE_REMAINING and
> OFFSET_CONTINUOUS.
> 
> Signed-off-by: Huang Shijie <b32955@...escale.com>

Pushed to l2-mtd.git, thanks!

-- 
Best Regards,
Artem Bityutskiy

Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ