J. Bruce Fields f961e3f2ac nfsd: encoders mustn't use unitialized values in error cases
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: Ari Kauppi <Ari.Kauppi@synopsys.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: stable@vger.kernel.org
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
2017-05-10 14:25:19 -04:00
..
2017-02-27 18:43:46 -08:00
2017-05-08 18:06:18 -04:00
2017-04-27 18:00:16 -04:00
2017-02-27 18:43:46 -08:00
2017-04-08 00:47:49 -07:00
2017-02-27 18:43:46 -08:00
2017-01-30 16:32:25 -08:00
2017-02-27 18:43:46 -08:00
2017-04-19 15:56:24 -07:00