From: Li Lingfeng <lilingfeng3@huawei.com>
To: <trondmy@kernel.org>, <anna@kernel.org>, <jlayton@kernel.org>,
<bcodding@redhat.com>
Cc: <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>, <lilingfeng3@huawei.com>
Subject: [PATCH 0/2] nfs: handle failure during allocing lock/unlock data
Date: Sat, 19 Apr 2025 16:53:53 +0800 [thread overview]
Message-ID: <20250419085355.1451457-1-lilingfeng3@huawei.com> (raw)
Lack of memory can cause nfs_lock_context allocation failures in unlock
paths, triggering NULL pointer dereference upon unlock completion.
Additionally, failed nfs_open_context acquisition may lead to similar
vulnerabilities. Proper error handling during lock/unlock data
initialization prevents critical faults.
Li Lingfeng (2):
nfs: handle failure of nfs_get_lock_context in unlock path
nfs: handle failure of get_nfs_open_context
fs/nfs/nfs4proc.c | 21 ++++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)
--
2.31.1
next reply other threads:[~2025-04-19 8:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-19 8:53 Li Lingfeng [this message]
2025-04-19 8:53 ` [PATCH 1/2] nfs: handle failure of nfs_get_lock_context in unlock path Li Lingfeng
2025-04-19 8:53 ` [PATCH 2/2] nfs: handle failure of get_nfs_open_context Li Lingfeng
2025-04-19 12:34 ` Jeff Layton
2025-04-21 1:56 ` Li Lingfeng
2025-04-21 12:00 ` Jeff Layton
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=20250419085355.1451457-1-lilingfeng3@huawei.com \
--to=lilingfeng3@huawei.com \
--cc=anna@kernel.org \
--cc=bcodding@redhat.com \
--cc=houtao1@huawei.com \
--cc=jlayton@kernel.org \
--cc=lilingfeng@huaweicloud.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=trondmy@kernel.org \
--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