fs: nfs: Fix possible buffer overflow
nfs_readlink_req() interprets a 32bit value directly received from the
network as length argument to memcpy() without any boundary checking.
Clamp the copy size at the end of the incoming packet.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 84986ca commit 574ce994016107ad8ab0f845a785f28d7eaa5208
@Sascha Hauer Sascha Hauer authored on 2 Sep 2019
Showing 1 changed file
View
fs/nfs.c