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: <20200221162657.GG9496@magnolia>
Date:   Fri, 21 Feb 2020 08:26:57 -0800
From:   "Darrick J. Wong" <darrick.wong@...cle.com>
To:     David Howells <dhowells@...hat.com>
Cc:     viro@...iv.linux.org.uk, raven@...maw.net, mszeredi@...hat.com,
        christian@...uner.io, linux-api@...r.kernel.org,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 18/19] ext4: Add example fsinfo information [ver #16]

On Fri, Feb 21, 2020 at 02:43:05PM +0000, David Howells wrote:
> Darrick J. Wong <darrick.wong@...cle.com> wrote:
> 
> > > +	memcpy(ctx->buffer, es->s_volume_name, sizeof(es->s_volume_name));
> > 
> > Shouldn't this be checking that ctx->buffer is large enough to hold
> > s_volume_name?
> 
> Well, the buffer is guaranteed to be 4KiB in size.

Ah, ok.

> > > +	return strlen(ctx->buffer);
> > 
> > s_volume_name is /not/ a null-terminated string if the label is 16
> > characters long.
> 
> And the buffer is precleared, so it's automatically NULL terminated.

<nod>

> > > +#define FSINFO_ATTR_EXT4_TIMESTAMPS	0x400	/* Ext4 superblock timestamps */
> > 
> > I guess each filesystem gets ... 256 different attrs, and the third
> > nibble determines the namespace?
> 
> No.  Think of it as allocating namespace in 256-number blocks.  That means
> there are 16 million of them.  If a filesystem uses up an entire block, it can
> always allocate another one.  I don't think it likely that we'll get
> sufficient filesystems to eat them all.

Ah.  In that case I declare that we would like to reserve 0x5800-0x58FF
for XFS. :)

--D

> David
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ