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: <7CD95BBD-3552-47BD-ACF6-EC51F62787E1@oracle.com>
Date:   Mon, 11 Jul 2022 18:24:01 +0000
From:   Chuck Lever III <chuck.lever@...cle.com>
To:     Bruce Fields <bfields@...ldses.org>
CC:     Jeff Layton <jlayton@...hat.com>,
        Igor Mammedov <imammedo@...hat.com>,
        Linux NFS Mailing List <linux-nfs@...r.kernel.org>,
        Ondrej Valousek <ondrej.valousek.xm@...esas.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [GIT PULL] nfsd changes for 5.18



> On Jul 11, 2022, at 2:19 PM, Bruce Fields <bfields@...ldses.org> wrote:
> 
> On Mon, Jul 11, 2022 at 06:33:04AM -0400, Jeff Layton wrote:
>> On Sun, 2022-07-10 at 16:42 +0000, Chuck Lever III wrote:
>>>> This patch regressed clients that support TIME_CREATE attribute.
>>>> Starting with this patch client might think that server supports
>>>> TIME_CREATE and start sending this attribute in its requests.
>>> 
>>> Indeed, e377a3e698fb ("nfsd: Add support for the birth time
>>> attribute") does not include a change to nfsd4_decode_fattr4()
>>> that decodes the birth time attribute.
>>> 
>>> I don't immediately see another storage protocol stack in our
>>> kernel that supports a client setting the birth time, so NFSD
>>> might have to ignore the client-provided value.
>>> 
>> 
>> Cephfs allows this. My thinking at the time that I implemented it was
>> that it should be settable for backup purposes, but this was possibly a
>> mistake. On most filesystems, the btime seems to be equivalent to inode
>> creation time and is read-only.
> 
> So supporting it as read-only seems reasonable.
> 
> Clearly, failing to decode the setattr attempt isn't the right way to do
> that.  I'm not sure what exactly it should be doing--some kind of
> permission error on any setattr containing TIME_CREATE?

I don't think that will work.

NFSD now asserts FATTR4_WORD1_TIME_CREATE when clients ask for
the mask of attributes it supports. That means the server has
to process GETATTR and SETATTR (and OPEN) operations that
contain FATTR4_WORD1_TIME_CREATE as not an error. The protocol
allows the server to indicate it ignored the time_create value
by clearing the FATTR4_WORD1_TIME_CREATE bit in the attribute
bitmask it returns in the reply.


--
Chuck Lever



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ