Commit cf3a4f1e authored by liucheng (G)'s avatar liucheng (G) Committed by Joe Hershberger

CVE-2019-14195: nfs: fix unbounded memcpy with unvalidated length at nfs_readlink_reply

This patch adds a check to at nfs_readlink_reply.
Signed-off-by: default avatarCheng Liu <>
Reported-by: default avatarFermín Serna <>
Acked-by: Joe Hershberger's avatarJoe Hershberger <>
parent aa207cf3
......@@ -634,6 +634,9 @@ static int nfs_readlink_reply(uchar *pkt, unsigned len)
/* new path length */
rlen = ntohl([1 + nfsv3_data_offset]);
if (((uchar *)&([0]) - (uchar *)(&rpc_pkt) + rlen) > len)
return -NFS_RPC_DROP;
if (*((char *)&([2 + nfsv3_data_offset])) != '/') {
int pathlen;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment