NFSD: Protect against send buffer overflow in NFSv2 READDIR
authorChuck Lever <chuck.lever@oracle.com>
Thu, 1 Sep 2022 19:10:05 +0000 (15:10 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Oct 2022 10:34:38 +0000 (12:34 +0200)
commitdc7f225090c29a5f3b9419b1af32846a201555e7
tree7a213ded7c5d2917c49d02ef4a38279f2009f4d4
parentcedaf73c8bdaa666cd125257861155f273464a6f
NFSD: Protect against send buffer overflow in NFSv2 READDIR

[ Upstream commit 00b4492686e0497fdb924a9d4c8f6f99377e176c ]

Restore the previous limit on the @count argument to prevent a
buffer overflow attack.

Fixes: 53b1119a6e50 ("NFSD: Fix READDIR buffer overflow")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfsd/nfsproc.c