diff options
author | liucheng (G) <liucheng32@huawei.com> | 2019-08-29 13:47:40 +0000 |
---|---|---|
committer | Chin Liang See <chin.liang.see@intel.com> | 2019-10-17 11:02:20 +0800 |
commit | cb44f2bd555d40e5950039c9c36518f4d0489d89 (patch) | |
tree | 65f747a0c324d5ceef51c7b28278236f8047740c | |
parent | c8bc539d6127b85d29ed4122bda976663045f3a6 (diff) | |
download | u-boot-socfpga-cb44f2bd555d40e5950039c9c36518f4d0489d89.tar.gz |
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: Cheng Liu <liucheng32@huawei.com>
Reported-by: FermÃn Serna <fermin@semmle.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
-rw-r--r-- | net/nfs.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -732,6 +732,9 @@ static void nfs_handler(uchar *pkt, unsigned dest, struct in_addr sip, debug("%s\n", __func__); + if (len > sizeof(struct rpc_t)) + return; + if (dest != nfs_our_port) return; |