[U-Boot] [PATCH v2 2/5] CVE: nfs: fix stack-based buffer overflow in some nfs_handler reply helper functions //RE: [PATCH 2/5] CVE: nfs: fix stack-based buffer overflow in some nfs_handler reply helper functions
liucheng (G)
liucheng32 at huawei.com
Thu Aug 22 03:28:01 UTC 2019
Changes in v2:
- Add reported-by tag for patch 2/5
--------------------------------------------------------------------------------------------------------------
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 at huawei.com>
Reported-by: FermÃn Serna <fermin at semmle.com>
---
net/nfs.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/nfs.c b/net/nfs.c
index d6a7f8e..b7cf3b3 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;
--
1.8.5.6
-----Original Message-----
From: liucheng (G)
Sent: Wednesday, August 21, 2019 10:48 PM
To: u-boot at lists.denx.de
Cc: liucheng (G) <liucheng32 at huawei.com>
Subject: [PATCH 2/5] CVE: nfs: fix stack-based buffer overflow in some nfs_handler reply helper functions
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 at huawei.com>
---
net/nfs.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/nfs.c b/net/nfs.c
index d6a7f8e..b7cf3b3 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;
--
1.8.5.6
More information about the U-Boot
mailing list