diff options
author | Limeng <Meng.Li@windriver.com> | 2019-09-26 09:46:07 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-09-27 13:02:16 +0100 |
commit | 205069a9e858c595989335af32319c4720242bfd (patch) | |
tree | cca193e0e3840bed02fe0c46818e5108f23f9f3d /meta/recipes-bsp/u-boot/files/0005-CVE-2019-14192-14193-14199.patch | |
parent | 91b787334a84c2f0475eb4af5883b3837023aa61 (diff) | |
download | poky-205069a9e858c595989335af32319c4720242bfd.tar.gz |
u-boot: add CVE patches for u-boot
Add 9 patches to fix below CVE issues.
CVE-2019-13103
CVE-2019-13104
CVE-2019-13105
CVE-2019-13106
CVE-2019-14192
CVE-2019-14193
CVE-2019-14194
CVE-2019-14195
CVE-2019-14196
CVE-2019-14197
CVE-2019-14198
CVE-2019-14199
CVE-2019-14200
CVE-2019-14201
CVE-2019-14202
CVE-2019-14203
CVE-2019-14204
(From OE-Core rev: db22dbe158dcb2298bfd74ff6cbba31f67488035)
Signed-off-by: Meng Li <Meng.Li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-bsp/u-boot/files/0005-CVE-2019-14192-14193-14199.patch')
-rw-r--r-- | meta/recipes-bsp/u-boot/files/0005-CVE-2019-14192-14193-14199.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/meta/recipes-bsp/u-boot/files/0005-CVE-2019-14192-14193-14199.patch b/meta/recipes-bsp/u-boot/files/0005-CVE-2019-14192-14193-14199.patch new file mode 100644 index 0000000000..a19545a2d3 --- /dev/null +++ b/meta/recipes-bsp/u-boot/files/0005-CVE-2019-14192-14193-14199.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | From e8e602f4a4b2aacfb3da32bb8a838be15ea70e7b Mon Sep 17 00:00:00 2001 | ||
2 | From: "liucheng (G)" <liucheng32@huawei.com> | ||
3 | Date: Thu, 29 Aug 2019 13:47:33 +0000 | ||
4 | Subject: [PATCH 5/9] CVE: net: fix unbounded memcpy of UDP packet | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | This patch adds a check to udp_len to fix unbounded memcpy for | ||
10 | CVE-2019-14192, CVE-2019-14193 and CVE-2019-14199. | ||
11 | |||
12 | Signed-off-by: Cheng Liu <liucheng32@huawei.com> | ||
13 | Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> | ||
14 | Reported-by: FermÃn Serna <fermin@semmle.com> | ||
15 | Acked-by: Joe Hershberger <joe.hershberger@ni.com> | ||
16 | |||
17 | Upstream-Status: Backport[http://git.denx.de/?p=u-boot.git;a=commit; | ||
18 | h=fe7288069d2e6659117049f7d27e261b550bb725] | ||
19 | |||
20 | CVE: CVE-2019-14192, CVE-2019-14193 and CVE-2019-14199 | ||
21 | |||
22 | Signed-off-by: Meng Li <Meng.Li@windriver.com> | ||
23 | --- | ||
24 | net/net.c | 3 +++ | ||
25 | 1 file changed, 3 insertions(+) | ||
26 | |||
27 | diff --git a/net/net.c b/net/net.c | ||
28 | index 58b0417cbe..38105f1142 100644 | ||
29 | --- a/net/net.c | ||
30 | +++ b/net/net.c | ||
31 | @@ -1252,6 +1252,9 @@ void net_process_received_packet(uchar *in_packet, int len) | ||
32 | return; | ||
33 | } | ||
34 | |||
35 | + if (ntohs(ip->udp_len) < UDP_HDR_SIZE || ntohs(ip->udp_len) > ntohs(ip->ip_len)) | ||
36 | + return; | ||
37 | + | ||
38 | debug_cond(DEBUG_DEV_PKT, | ||
39 | "received UDP (to=%pI4, from=%pI4, len=%d)\n", | ||
40 | &dst_ip, &src_ip, len); | ||
41 | -- | ||
42 | 2.17.1 | ||
43 | |||