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: <87bm9ft5h5.fsf@mail.parknet.co.jp>
Date:   Mon, 03 Sep 2018 16:17:26 +0900
From:   OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
To:     Pali Rohár <pali.rohar@...il.com>
Cc:     linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH] fat: Relax checks for sector size and media type

Pali Rohár <pali.rohar@...il.com> writes:

> Windows fastfat.sys driver accepts also media types 0x00 and 0x01 and
> sector sizes 128 and 256 bytes. Linux mkfs.fat can format disk also to
> larger FAT sector sizes then 4096 bytes, therefore relax also upper limit
> restriction.

> -	if (!is_power_of_2(bpb->fat_sector_size)
> -	    || (bpb->fat_sector_size < 512)
> -	    || (bpb->fat_sector_size > 4096)) {
> +	if (!is_power_of_2(bpb->fat_sector_size)) {

Just relaxing validation doesn't work. The block layer doesn't support
smaller than 512, and lager than PAGE_SIZE.  (And in specification, fat
doesn't support lager than 4096.)

>  static inline int fat_valid_media(u8 media)
>  {
> -	return 0xf8 <= media || media == 0xf0;
> +	return 0xf8 <= media || media == 0xf0 || media == 0x00 || media == 0x01;
>  }
>  #endif /* !_LINUX_MSDOS_FS_H */

This is ok though, this would be for ancient floppy media.

Thanks.
-- 
OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ