diff options
| author | Chuck Lever <cel@kernel.org> | 2026-09-01 16:19:44 -0400 |
|---|---|---|
| committer | Chuck Lever <cel@kernel.org> | 2026-10-04 21:15:29 -0400 |
| commit | dbed9418c48906dae1a7bc328fb3bc0d0d0020c8 (patch) | |
| tree | 5237c042cd5e91f8f86cd05ac5037f2202a0a2b5 /scripts | |
| parent | 8cef2b0a01d28647facc57501a3df7ccd8d13ccd (diff) | |
NFSD: Reject an oversized principal hash from nfsdcld
__cld_pipe_inprogress_downcall() takes the principal hash length
from the daemon's GraceStart downcall without checking it against
the cc_princhash payload it describes, which holds at most
SHA256_DIGEST_SIZE bytes. The length is stored verbatim in the
reclaim record, and nfsd4_cld_check_v2() later hands it to memcmp()
against a digest array of SHA256_DIGEST_SIZE bytes on the stack. A
length up to U8_MAX reads past the end of that array, and the stray
bytes can only make the comparison fail, denying the client its
reclaim. The pipe is mode 0600 in rpc_pipefs, so the trigger is a
broken or hostile nfsdcld rather than an unprivileged task.
Reject a length larger than the wire field, as the existing check
on the client name length does.
Fixes: 6ee95d1c8991 ("nfsd: add support for upcall version 2")
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20260901-alemi-v2-4-e163f94a3a6e@kernel.org
Signed-off-by: Chuck Lever <cel@kernel.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
