From: liucheng (G) Date: Thu, 29 Aug 2019 13:47:40 +0000 (+0000) Subject: CVE: nfs: fix stack-based buffer overflow in some nfs_handler reply helper functions X-Git-Tag: v2019.10-rc4~22^2~6 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=741a8a08ebe5bc3ccfe3cde6c2b44ee53891af21;p=oweals%2Fu-boot.git 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 Reported-by: Fermín Serna Acked-by: Joe Hershberger --- diff --git a/net/nfs.c b/net/nfs.c index d6a7f8e827..b7cf3b3a18 100644 --- a/net/nfs.c +++ b/net/nfs.c @@ -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;