All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] pppd: Add upstream fix for CVE-2020-8597
@ 2020-03-06  1:04 Chris Packham
  2020-03-08 16:23 ` Peter Korsgaard
  2020-03-15 10:48 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Chris Packham @ 2020-03-06  1:04 UTC (permalink / raw)
  To: buildroot

Apply patch from upstream and set PPPD_INGORE_CVES appropriately.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
---
 package/pppd/0001-pppd-Fix-bounds-check.patch | 37 +++++++++++++++++++
 package/pppd/pppd.mk                          |  3 ++
 2 files changed, 40 insertions(+)
 create mode 100644 package/pppd/0001-pppd-Fix-bounds-check.patch

diff --git a/package/pppd/0001-pppd-Fix-bounds-check.patch b/package/pppd/0001-pppd-Fix-bounds-check.patch
new file mode 100644
index 0000000000..5d7c51bcac
--- /dev/null
+++ b/package/pppd/0001-pppd-Fix-bounds-check.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';
diff --git a/package/pppd/pppd.mk b/package/pppd/pppd.mk
index 4784fe79f8..685666a200 100644
--- a/package/pppd/pppd.mk
+++ b/package/pppd/pppd.mk
@@ -11,6 +11,9 @@ PPPD_LICENSE_FILES = \
 	pppd/tdb.c pppd/plugins/pppoatm/COPYING \
 	pppdump/bsd-comp.c pppd/ccp.c pppd/plugins/passprompt.c
 
+# 0001-pppd-Fix-bounds-check.patch
+PPPD_IGNORE_CVES += CVE-2020-8597
+
 PPPD_MAKE_OPTS = HAVE_INET6=y
 ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y)
 PPPD_DEPENDENCIES += openssl
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] pppd: Add upstream fix for CVE-2020-8597
  2020-03-06  1:04 [Buildroot] [PATCH] pppd: Add upstream fix for CVE-2020-8597 Chris Packham
@ 2020-03-08 16:23 ` Peter Korsgaard
  2020-03-15 10:48 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2020-03-08 16:23 UTC (permalink / raw)
  To: buildroot

>>>>> "Chris" == Chris Packham <judge.packham@gmail.com> writes:

 > Apply patch from upstream and set PPPD_INGORE_CVES appropriately.
 > Signed-off-by: Chris Packham <judge.packham@gmail.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] pppd: Add upstream fix for CVE-2020-8597
  2020-03-06  1:04 [Buildroot] [PATCH] pppd: Add upstream fix for CVE-2020-8597 Chris Packham
  2020-03-08 16:23 ` Peter Korsgaard
@ 2020-03-15 10:48 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2020-03-15 10:48 UTC (permalink / raw)
  To: buildroot

>>>>> "Chris" == Chris Packham <judge.packham@gmail.com> writes:

 > Apply patch from upstream and set PPPD_INGORE_CVES appropriately.
 > Signed-off-by: Chris Packham <judge.packham@gmail.com>

Committed to 2019.02.x and 2019.11.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-03-15 10:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-06  1:04 [Buildroot] [PATCH] pppd: Add upstream fix for CVE-2020-8597 Chris Packham
2020-03-08 16:23 ` Peter Korsgaard
2020-03-15 10:48 ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.