summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity
diff options
context:
space:
mode:
authorYi Zhao <yi.zhao@windriver.com>2020-02-21 22:59:42 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-03-07 10:56:45 +0000
commitd37b23160b9177fd77c60d3b67230a372fa4bba8 (patch)
treec57ab1d85268b359fd0a86172393e82bf34c93e0 /meta/recipes-connectivity
parenta448c477612187ab4707df92d347607bfda147e8 (diff)
downloadpoky-d37b23160b9177fd77c60d3b67230a372fa4bba8.tar.gz
ppp: Security fix CVE-2020-8597
CVE-2020-8597: eap.c in pppd in ppp 2.4.2 through 2.4.8 has an rhostname buffer overflow in the eap_request and eap_response functions. References: https://nvd.nist.gov/vuln/detail/CVE-2020-8597 Patch from: https://github.com/paulusmack/ppp/commit/8d7970b8f3db727fe798b65f3377fe6787575426 (From OE-Core rev: b01505e018ff46f1af34f98219d55f4ca700cd5a) (From OE-Core rev: f0c7e7d03d1e9f7426031acdde3f7452118edd8c) Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity')
-rw-r--r--meta/recipes-connectivity/ppp/ppp/0001-pppd-Fix-bounds-check-in-EAP-code.patch47
-rw-r--r--meta/recipes-connectivity/ppp/ppp_2.4.7.bb1
2 files changed, 48 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/ppp/ppp/0001-pppd-Fix-bounds-check-in-EAP-code.patch b/meta/recipes-connectivity/ppp/ppp/0001-pppd-Fix-bounds-check-in-EAP-code.patch
new file mode 100644
index 0000000000..b7ba7ba643
--- /dev/null
+++ b/meta/recipes-connectivity/ppp/ppp/0001-pppd-Fix-bounds-check-in-EAP-code.patch
@@ -0,0 +1,47 @@
1From 8d7970b8f3db727fe798b65f3377fe6787575426 Mon Sep 17 00:00:00 2001
2From: Paul Mackerras <paulus@ozlabs.org>
3Date: Mon, 3 Feb 2020 15:53:28 +1100
4Subject: [PATCH] pppd: Fix bounds check in EAP code
5
6Given that we have just checked vallen < len, it can never be the case
7that vallen >= len + sizeof(rhostname). This fixes the check so we
8actually avoid overflowing the rhostname array.
9
10Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
11Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
12
13Upstream-Status: Backport
14[https://github.com/paulusmack/ppp/commit/8d7970b8f3db727fe798b65f3377fe6787575426]
15
16CVE: CVE-2020-8597
17
18Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
19---
20 pppd/eap.c | 4 ++--
21 1 file changed, 2 insertions(+), 2 deletions(-)
22
23diff --git a/pppd/eap.c b/pppd/eap.c
24index 94407f5..1b93db0 100644
25--- a/pppd/eap.c
26+++ b/pppd/eap.c
27@@ -1420,7 +1420,7 @@ int len;
28 }
29
30 /* Not so likely to happen. */
31- if (vallen >= len + sizeof (rhostname)) {
32+ if (len - vallen >= sizeof (rhostname)) {
33 dbglog("EAP: trimming really long peer name down");
34 BCOPY(inp + vallen, rhostname, sizeof (rhostname) - 1);
35 rhostname[sizeof (rhostname) - 1] = '\0';
36@@ -1846,7 +1846,7 @@ int len;
37 }
38
39 /* Not so likely to happen. */
40- if (vallen >= len + sizeof (rhostname)) {
41+ if (len - vallen >= sizeof (rhostname)) {
42 dbglog("EAP: trimming really long peer name down");
43 BCOPY(inp + vallen, rhostname, sizeof (rhostname) - 1);
44 rhostname[sizeof (rhostname) - 1] = '\0';
45--
462.17.1
47
diff --git a/meta/recipes-connectivity/ppp/ppp_2.4.7.bb b/meta/recipes-connectivity/ppp/ppp_2.4.7.bb
index 644cde4562..60c56dd0bd 100644
--- a/meta/recipes-connectivity/ppp/ppp_2.4.7.bb
+++ b/meta/recipes-connectivity/ppp/ppp_2.4.7.bb
@@ -33,6 +33,7 @@ SRC_URI = "https://download.samba.org/pub/${BPN}/${BP}.tar.gz \
33 file://0001-pppoe-include-netinet-in.h-before-linux-in.h.patch \ 33 file://0001-pppoe-include-netinet-in.h-before-linux-in.h.patch \
34 file://0001-ppp-Remove-unneeded-include.patch \ 34 file://0001-ppp-Remove-unneeded-include.patch \
35 file://ppp-2.4.7-DES-openssl.patch \ 35 file://ppp-2.4.7-DES-openssl.patch \
36 file://0001-pppd-Fix-bounds-check-in-EAP-code.patch \
36" 37"
37 38
38SRC_URI_append_libc-musl = "\ 39SRC_URI_append_libc-musl = "\