nfs: Fix out of bounds read
nfs_read_reply() interprets the fields of an incoming packet directly
as a field length without checking the boundaries. Clamp the maximum
length to the packet length to avoid reading out of bounds.

Reported-by: Jai Verma <jai2.verma@outlook.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 1b57c73 commit c0f0cbd1759a6ca6cbda4001dff5764f6633c825
@Sascha Hauer Sascha Hauer authored on 3 Jun 2020
Showing 1 changed file
View
net/nfs.c