summaryrefslogtreecommitdiff
path: root/user/ppp/CVE-2020-8597.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2020-02-26 04:04:05 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2020-02-26 04:04:05 +0000
commit74e1ebacbf29188a4d41381d83b2bb47e593b241 (patch)
tree508a04ffd433fb8c98a78b7c42aca7390835ef3b /user/ppp/CVE-2020-8597.patch
parentce0afc1e48e10bf96d9de42a005669db6d41ed16 (diff)
downloadpackages-74e1ebacbf29188a4d41381d83b2bb47e593b241.tar.gz
packages-74e1ebacbf29188a4d41381d83b2bb47e593b241.tar.bz2
packages-74e1ebacbf29188a4d41381d83b2bb47e593b241.tar.xz
packages-74e1ebacbf29188a4d41381d83b2bb47e593b241.zip
user/ppp: [CVE!] Bump to 2.4.8
Diffstat (limited to 'user/ppp/CVE-2020-8597.patch')
-rw-r--r--user/ppp/CVE-2020-8597.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/user/ppp/CVE-2020-8597.patch b/user/ppp/CVE-2020-8597.patch
new file mode 100644
index 000000000..5d7c51bca
--- /dev/null
+++ b/user/ppp/CVE-2020-8597.patch
@@ -0,0 +1,37 @@
+From 8d7970b8f3db727fe798b65f3377fe6787575426 Mon Sep 17 00:00:00 2001
+From: Paul Mackerras <paulus@ozlabs.org>
+Date: Mon, 3 Feb 2020 15:53:28 +1100
+Subject: [PATCH] pppd: Fix bounds check in EAP code
+
+Given that we have just checked vallen < len, it can never be the case
+that vallen >= len + sizeof(rhostname). This fixes the check so we
+actually avoid overflowing the rhostname array.
+
+Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
+Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
+---
+ pppd/eap.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/pppd/eap.c b/pppd/eap.c
+index 94407f56..1b93db01 100644
+--- a/pppd/eap.c
++++ b/pppd/eap.c
+@@ -1420,7 +1420,7 @@ int len;
+ }
+
+ /* Not so likely to happen. */
+- if (vallen >= len + sizeof (rhostname)) {
++ if (len - vallen >= sizeof (rhostname)) {
+ dbglog("EAP: trimming really long peer name down");
+ BCOPY(inp + vallen, rhostname, sizeof (rhostname) - 1);
+ rhostname[sizeof (rhostname) - 1] = '\0';
+@@ -1846,7 +1846,7 @@ int len;
+ }
+
+ /* Not so likely to happen. */
+- if (vallen >= len + sizeof (rhostname)) {
++ if (len - vallen >= sizeof (rhostname)) {
+ dbglog("EAP: trimming really long peer name down");
+ BCOPY(inp + vallen, rhostname, sizeof (rhostname) - 1);
+ rhostname[sizeof (rhostname) - 1] = '\0';