From: Chuck Lever <chuck.lever@oracle.com>
To: Li Lingfeng <lilingfeng3@huawei.com>
Cc: jlayton@kernel.org, neilb@suse.de, okorniev@redhat.com,
Dai.Ngo@oracle.com, tom@talpey.com, linux-nfs@vger.kernel.org,
linux-kernel@vger.kernel.org, yukuai1@huaweicloud.com,
houtao1@huawei.com, yi.zhang@huawei.com, yangerkun@huawei.com,
lilingfeng@huaweicloud.com
Subject: Re: [PATCH] nfsd: return -EINVAL when namelen is 0
Date: Tue, 3 Sep 2024 17:35:06 -0400 [thread overview]
Message-ID: <ZteBCowxVXt7DLFF@tissot.1015granger.net> (raw)
In-Reply-To: <20240903111446.659884-1-lilingfeng3@huawei.com>
On Tue, 03 Sep 2024 19:14:46 +0800, Li Lingfeng wrote:
> When we have a corrupted main.sqlite in /var/lib/nfs/nfsdcld/, it may
> result in namelen being 0, which will cause memdup_user() to return
> ZERO_SIZE_PTR.
> When we access the name.data that has been assigned the value of
> ZERO_SIZE_PTR in nfs4_client_to_reclaim(), null pointer dereference is
> triggered.
>
> [...]
Kept the new dprintk call sites since this is not a hot path and
there needs to be some observability here rather than a silent
failure. I'm not convinced the error text is especially clear, but
I don't have a better suggestion at the moment.
Applied to nfsd-next for v6.12, thanks!
[1/1] nfsd: return -EINVAL when namelen is 0
commit: e492841732bbce2b2dd19cd285d5e7f61b1bdaee
--
Chuck Lever
next prev parent reply other threads:[~2024-09-03 21:36 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-03 11:14 Li Lingfeng
2024-09-03 11:23 ` Jeff Layton
2024-09-03 15:27 ` Chuck Lever
2024-09-03 15:35 ` Jeff Layton
2024-09-03 21:35 ` Chuck Lever [this message]
2024-09-04 13:06 ` Guoqing Jiang
2024-09-04 14:16 ` Chuck Lever
2024-09-04 14:48 ` Scott Mayhew
2024-09-05 1:25 ` Li Lingfeng
2024-09-08 20:25 ` David Laight
2024-09-09 11:24 ` Scott Mayhew
2024-09-09 11:33 ` David Laight
2024-09-09 14:10 ` Chuck Lever
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=ZteBCowxVXt7DLFF@tissot.1015granger.net \
--to=chuck.lever@oracle.com \
--cc=Dai.Ngo@oracle.com \
--cc=houtao1@huawei.com \
--cc=jlayton@kernel.org \
--cc=lilingfeng3@huawei.com \
--cc=lilingfeng@huaweicloud.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
--cc=okorniev@redhat.com \
--cc=tom@talpey.com \
--cc=yangerkun@huawei.com \
--cc=yi.zhang@huawei.com \
--cc=yukuai1@huaweicloud.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
all inboxes | Powered by JetHome®