From: bfields@fieldses.org (J. Bruce Fields)
To: Jeffrey Mitchell <jeffrey.mitchell@starlab.io>
Cc: Trond Myklebust <trond.myklebust@hammerspace.com>,
Anna Schumaker <anna.schumaker@netapp.com>,
linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] nfs: Fix security label length not being reset
Date: Tue, 15 Sep 2020 14:33:10 -0400 [thread overview]
Message-ID: <20200915183310.GB32632@fieldses.org> (raw)
In-Reply-To: <20200914154958.55451-1-jeffrey.mitchell@starlab.io>
On Mon, Sep 14, 2020 at 10:49:57AM -0500, Jeffrey Mitchell wrote:
> nfs_readdir_page_filler() iterates over entries in a directory, reusing
> the same security label buffer, but does not reset the buffer's length.
> This causes decode_attr_security_label() to return -ERANGE if an entry's
> security label is longer than the previous one's. This error, in
> nfs4_decode_dirent(), only gets passed up as -EAGAIN, which causes another
> failed attempt to copy into the buffer. The second error is ignored and
> the remaining entries do not show up in ls, specifically the getdents64()
> syscall.
>
> Reproduce by creating multiple files in NFS and giving one of the later
> files a longer security label. ls will not see that file nor any that are
> added afterwards, though they will exist on the backend.
Please include these paragraphs in the changelog.
--b.
>
> - Jeffrey
>
> Jeffrey Mitchell (1):
> nfs: Fix security label length not being reset
>
> fs/nfs/dir.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> --
> 2.25.1
next prev parent reply other threads:[~2020-09-15 18:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-14 15:49 [PATCH] nfs: Fix security label length not being reset Jeffrey Mitchell
2020-09-14 15:49 ` Jeffrey Mitchell
2020-09-15 18:33 ` J. Bruce Fields [this message]
2020-09-15 21:42 ` [PATCH v2] " Jeffrey Mitchell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200915183310.GB32632@fieldses.org \
--to=bfields@fieldses.org \
--cc=anna.schumaker@netapp.com \
--cc=jeffrey.mitchell@starlab.io \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@hammerspace.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).