ppp/ppp-CVE-2020-8597.patch
Reinhard Max 4505baafb8 - New version 2.4.8.
* New pppd options have been added:
    * ifname, to set the name for the PPP interface device
    * defaultroute-metric, to set the metric for the default route
    * defaultroute6, to add an IPv6 default route (with
      nodefaultroute6 to prevent adding an IPv6 default route).
    * up_sdnotify, to have pppd notify systemd when the link is up.
  * The rp-pppoe plugin has new options:
    * host-uniq, to set the Host-Uniq value to send
    * pppoe-padi-timeout, to set the timeout for discovery packets
    * pppoe-padi-attempts, to set the number of discovery attempts.
  * Added the CLASS attribute in radius packets.
  * Fixed warnings and issues found by static analysis.
- Obsoleted patches:
  [...]
- Patches that got renamed, because they needed rediffing:
 [...] 
- bsc#1172916: Fix an outdated comment for lcp-echo-interval.

OBS-URL: https://build.opensuse.org/package/show/network/ppp?expand=0&rev=60
2020-08-03 15:45:36 +00:00

36 lines
1.2 KiB
Diff

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(-)
--- pppd/eap.c.orig
+++ 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';