Commit de3208f
Olga Kornievskaia
nfsd: don't ignore the return code of svc_proc_register()
JIRA: https://issues.redhat.com/browse/RHEL-93612
CVE: CVE-2025-22026
Conflicts: several conflicts
patching file fs/nfsd/nfsctl.c
Hunk #1 FAILED at 2202.
Due to missing 86ab08b "SUNRPC: replace program list with program
array" -- a part of a large patch series
Due to missing 73598a0 "nfsd: don't allocate the versions array."
-- a part of the large patch series
Hunk #2 FAILED at 2213.
because there is no LOCALIO functionality but specifically
fa49838 "nfsd: add LOCALIO support"
checking file fs/nfsd/stats.h
Hunk #1 FAILED at 10.
Due to missing 7d12cce "fs: nfsd: use group allocation/free of
per-cpu counters API"
commit 930b64c
Author: Jeff Layton <jlayton@kernel.org>
Date: Thu, 6 Feb 2025 13:12:13 -0500
Currently, nfsd_proc_stat_init() ignores the return value of
svc_proc_register(). If the procfile creation fails, then the kernel
will WARN when it tries to remove the entry later.
Fix nfsd_proc_stat_init() to return the same type of pointer as
svc_proc_register(), and fix up nfsd_net_init() to check that and fail
the nfsd_net construction if it occurs.
svc_proc_register() can fail if the dentry can't be allocated, or if an
identical dentry already exists. The second case is pretty unlikely in
the nfsd_net construction codepath, so if this happens, return -ENOMEM.
Reported-by: syzbot+e34ad04f27991521104c@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/linux-nfs/67a47501.050a0220.19061f.05f9.GAE@google.com/
Cc: stable@vger.kernel.org # v6.9
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Olga Kornievskaia <okorniev@redhat.com>1 parent 6e54f33 commit de3208f
3 files changed
+10
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2236 | 2236 | | |
2237 | 2237 | | |
2238 | 2238 | | |
| 2239 | + | |
2239 | 2240 | | |
2240 | 2241 | | |
| 2242 | + | |
| 2243 | + | |
| 2244 | + | |
| 2245 | + | |
2241 | 2246 | | |
2242 | 2247 | | |
2243 | 2248 | | |
2244 | 2249 | | |
2245 | 2250 | | |
2246 | 2251 | | |
2247 | 2252 | | |
2248 | | - | |
2249 | 2253 | | |
2250 | 2254 | | |
2251 | 2255 | | |
| 2256 | + | |
| 2257 | + | |
2252 | 2258 | | |
2253 | 2259 | | |
2254 | 2260 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
| 118 | + | |
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
0 commit comments