Skip to content
Commit f97e5ec8 authored by J. Bruce Fields's avatar J. Bruce Fields Committed by Sasha Levin
Browse files

nfsd: encoders mustn't use unitialized values in error cases



[ Upstream commit f961e3f2 ]

In error cases, lgp->lg_layout_type may be out of bounds; so we
shouldn't be using it until after the check of nfserr.

This was seen to crash nfsd threads when the server receives a LAYOUTGET
request with a large layout type.

GETDEVICEINFO has the same problem.

Reported-by: default avatarAri Kauppi <Ari.Kauppi@synopsys.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
parent a7b4cdeb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment