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

CVE: nfs: fix stack-based buffer overflow in some nfs_handler reply helper functions

This patch adds a check to nfs_handler to fix buffer overflow for CVE-2019-14197,
CVE-2019-14200, CVE-2019-14201, CVE-2019-14202, CVE-2019-14203 and CVE-2019-14204.
Signed-off-by: default avatarCheng Liu <liucheng32@huawei.com>
Reported-by: default avatarFermín Serna <fermin@semmle.com>
Acked-by: Joe Hershberger's avatarJoe Hershberger <joe.hershberger@ni.com>
parent fe728806
...@@ -732,6 +732,9 @@ static void nfs_handler(uchar *pkt, unsigned dest, struct in_addr sip, ...@@ -732,6 +732,9 @@ static void nfs_handler(uchar *pkt, unsigned dest, struct in_addr sip,
debug("%s\n", __func__); debug("%s\n", __func__);
if (len > sizeof(struct rpc_t))
return;
if (dest != nfs_our_port) if (dest != nfs_our_port)
return; return;
......
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