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: <20171122085203.oyvtmbp4hpxnee5e@pali>
Date:   Wed, 22 Nov 2017 09:52:03 +0100
From:   Pali Rohár <pali.rohar@...il.com>
To:     Karel Zak <kzak@...hat.com>
Cc:     Andreas Bombe <aeb@...ian.org>, util-linux@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Andrius Štikonas <andrius@...konas.eu>,
        Curtis Gedak <gedakc@...il.com>,
        Andy Shevchenko <andy.shevchenko@...il.com>,
        Pavel Machek <pavel@....cz>
Subject: Re: Linux & FAT32 label

On Monday 20 November 2017 12:12:56 Karel Zak wrote:
> On Sun, Nov 19, 2017 at 01:44:40PM +0100, Pali Rohár wrote:
> > On Thursday 09 November 2017 22:21:31 Pali Rohár wrote:
> > > So from all tests and discussion I would propose new unification:
> > > 
> > > 1. Read label only from the root directory. If label in root directory
> > >    is missing then disk would be treated as without label. Label from
> > >    boot sector would not be read.
> > > 
> > >    --> Reason: Windows XP and mlabel ignores what is written in boot
> > >        sector. Windows XP even do not update boot sector, so label
> > >        stored in boot sector is incorrect after any change done by
> > >        Windows XP.
> > > 
> > >        This logic is used by all tested MS-DOS and Windows versions,
> > >        plus also by mtools on Linux.
> > > 
> > > 2. Write label to to both location, boot sector and root directory.
> > > 
> > >    --> Reason: MS-DOS 6.22, MS-DOS 7.10, Windows 98 and also mtools on
> > >        Linux do this. This is also what is written in FAT specification.
> > > 
> > >        It also provides backward compatibility with old dosfslabel
> > >        versions which read label only from boot sector.
> > > 
> > > 2. Process 'NO NAME    ' label in root directory as 'NO NAME' name. Not
> > >    as empty label.
> > > 
> > >    --> Reason: 'NO NAME    ' is regular entry in root directory and both
> > >        Windows XP and mlabel handle it in this way.
> > > 
> > > 3. Process 'NO NAME    ' label in boot directory as empty label. Not as
> > >    label with name 'NO NAME'.
> > > 
> > >    --> Reason: On Windows XP when formatting empty disk and label is not
> > >        specified then 'NO NAME    ' is stored to boot sector.
> > > 
> > >        Also in FAT specification is written that empty label is stored
> > >        as 'NO NAME    '.
> > > 
> > > With this change we would get compatibility with MS-DOS, Windows (both
> > > DOS-based and NT-based) and also with Linux mtools, modulo problems DOS
> > > code page.
> > > 
> > > There are just two negatives:
> > > 
> > > 1) Labels set by old dosfslabel versions (which stored them only to boot
> > >    sector) would not be visible. But they are already not visible on
> > >    MS-DOS or Windows machines, and also via mlabel (from mtools).
> > > 
> > > 2) Behavior of blkid and fatlabel would be changed as both tools have
> > >    different as proposed above, and based on tests they also differ each
> > >    from other.
> > > 
> > > Andreas, Karel, what do you think about it?
> > 
> > Also for other people, do any have comments on my proposed solution?
> 
> Go ahead and send patch :-) (also with LABEL_FATBOOT=)

Ok, but what with fatlabel (from dosfstools)?
Andreas, any comments on this solution?

I can prepare patches for blkid (util-linux), but I do not like idea to
have different algorithm how is read label in fatlabel and blkid. Both
tools are used by different GUI programs and it is a bad if one GUI
program on linux (e.g. GParted) tells you that label is A and another
(e.g. KDE Partition Manager) that label is B. So I rather wait for final
decision.

-- 
Pali Rohár
pali.rohar@...il.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ