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:	Sat, 13 Sep 2008 19:56:30 -0300
From:	Herton Ronaldo Krzesinski <herton@...driva.com.br>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	linux-kernel@...r.kernel.org, inux-usb@...r.kernel.org,
	bogdano@...driva.com.br, lcapitulino@...driva.com.br
Subject: Re: Partition check considered as error is breaking mounting in 2.6.27

On Friday 12 September 2008 20:34:16 Andrew Morton wrote:
> On Fri, 12 Sep 2008 13:56:49 -0300
> Herton Ronaldo Krzesinski <herton@...driva.com.br> wrote:
> 
> > Recently I found a problem with a buggy camera that doesn't mount anymore with 
> > 2.6.27 (its memory is available via usb-storage), since commit 
> > 04ebd4aee52b06a2c38127d9208546e5b96f3a19
> > 
> > The camera is an Olympus X-840. The original issue comes from the camera 
> > itself: its format program creates a partition with an off by one error, 
> > while the device reports that its memory has 42079 sectors, the partition 
> > table reports also that the only partition on the disk has the size of 42079, 
> > but it fails to account for the first sector in the memory that contains the 
> > partition table, so in the end the partition exceeds the limit of the device 
> > size (42080, first sector plus 42079 from the first partition).
> > 
> > In previous kernels (2.6.26 and before), I still could mount and access the 
> > device (/dev/sdb1), although with the following errors:
> 
> Yeah.
> 
> Can you test this please?

I have seen your reply on the other thread, but just to confirm yes, I tested
yesterday the same change that fixed the problem. I saw that the commit is
now on mainline, so regression fixed, thanks.

> 
> From: Andrew Morton <akpm@...ux-foundation.org>
> 
> Herton Krzesinski reports that the error-checking changes in
> 04ebd4aee52b06a2c38127d9208546e5b96f3a19 ("block/ioctl.c and
> fs/partition/check.c: check value returned by add_partition") cause his
> buggy USB camera to no longer mount.  "The camera is an Olympus X-840. 
> The original issue comes from the camera itself: its format program
> creates a partition with an off by one error".
> 
> Buggy devices happen.  It is better for the kernel to warn and to proceed
> with the mount.
> 
> Reported-by: Herton Ronaldo Krzesinski <herton@...driva.com.br>
> Cc: Abdel Benamrouche <draconux@...il.com>
> Cc: Jens Axboe <jens.axboe@...cle.com>
> Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
> ---
> 
>  fs/partitions/check.c |    1 -
>  1 file changed, 1 deletion(-)
> 
> diff -puN fs/partitions/check.c~rescan_partitions-make-device-capacity-errors-non-fatal fs/partitions/check.c
> --- a/fs/partitions/check.c~rescan_partitions-make-device-capacity-errors-non-fatal
> +++ a/fs/partitions/check.c
> @@ -540,7 +540,6 @@ int rescan_partitions(struct gendisk *di
>  		if (from + size > get_capacity(disk)) {
>  			printk(KERN_ERR " %s: p%d exceeds device capacity\n",
>  				disk->disk_name, p);
> -			continue;
>  		}
>  		res = add_partition(disk, p, from, size, state->parts[p].flags);
>  		if (res) {
> _
> 
> 

-- 
[]'s
Herton
--
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