Commit 18ab896
committed
nfsd: handle get_client_locked() failure in nfsd4_setclientid_confirm()
jira KERNEL-238
cve CVE-2025-38724
Rebuild_History Non-Buildable kernel-6.12.0-124.16.1.el10_1
commit-author Jeff Layton <jlayton@kernel.org>
commit 908e4ea
Lei Lu recently reported that nfsd4_setclientid_confirm() did not check
the return value from get_client_locked(). a SETCLIENTID_CONFIRM could
race with a confirmed client expiring and fail to get a reference. That
could later lead to a UAF.
Fix this by getting a reference early in the case where there is an
extant confirmed client. If that fails then treat it as if there were no
confirmed client found at all.
In the case where the unconfirmed client is expiring, just fail and
return the result from get_client_locked().
Reported-by: lei lu <llfamsec@gmail.com>
Closes: https://lore.kernel.org/linux-nfs/CAEBF3_b=UvqzNKdnfD_52L05Mqrqui9vZ2eFamgAbV0WG+FNWQ@mail.gmail.com/
Fixes: d20c11d ("nfsd: Protect session creation and client confirm using client_lock")
Cc: stable@vger.kernel.org
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
(cherry picked from commit 908e4ea)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>1 parent 468437a commit 18ab896
1 file changed
+15
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4697 | 4697 | | |
4698 | 4698 | | |
4699 | 4699 | | |
4700 | | - | |
4701 | | - | |
4702 | | - | |
4703 | | - | |
| 4700 | + | |
| 4701 | + | |
| 4702 | + | |
| 4703 | + | |
| 4704 | + | |
| 4705 | + | |
| 4706 | + | |
| 4707 | + | |
| 4708 | + | |
| 4709 | + | |
4704 | 4710 | | |
4705 | 4711 | | |
4706 | 4712 | | |
| |||
4717 | 4723 | | |
4718 | 4724 | | |
4719 | 4725 | | |
| 4726 | + | |
| 4727 | + | |
| 4728 | + | |
| 4729 | + | |
| 4730 | + | |
4720 | 4731 | | |
4721 | 4732 | | |
4722 | 4733 | | |
4723 | | - | |
4724 | 4734 | | |
4725 | 4735 | | |
4726 | 4736 | | |
| |||
0 commit comments