ppp: update to version 2.4.8.git-2020-03-21
authorHans Dedecker <dedeckeh@gmail.com>
Sun, 5 Apr 2020 20:26:33 +0000 (22:26 +0200)
committerHans Dedecker <dedeckeh@gmail.com>
Mon, 6 Apr 2020 18:42:45 +0000 (20:42 +0200)
Use upstream latest git HEAD as it allows to remove the patches
700-radius-Prevent-buffer-overflow-in-rc_mksid,
701-pppd-Fix-bounds-check-in-EAP-code and
702-pppd-Ignore-received-EAP-messages-when-not-doing-EAP and
take in other fixes.

41a7323 pppd: Fixed spelling 'unkown' => 'unknown' (#141)
6b014be pppd: Print version information to stdout instead of stderr (#133)
cba2736 pppd: Add RFC1990 (Multilink) to the See Also section of the man page
f2f9554 pppd: Add mppe.h to the list of headers to install if MPPE is defined
ae54fcf pppd: Obfuscate password argument string
8d45443 pppd: Ignore received EAP messages when not doing EAP
8d7970b pppd: Fix bounds check in EAP code
858976b radius: Prevent buffer overflow in rc_mksid()

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
package/network/services/ppp/Makefile
package/network/services/ppp/patches/200-makefile.patch
package/network/services/ppp/patches/202-no_strip.patch
package/network/services/ppp/patches/300-filter-pcap-includes-lib.patch
package/network/services/ppp/patches/310-precompile_filter.patch
package/network/services/ppp/patches/600-Revert-pppd-Use-openssl-for-the-DES-instead-of-the-l.patch
package/network/services/ppp/patches/700-radius-Prevent-buffer-overflow-in-rc_mksid.patch [deleted file]
package/network/services/ppp/patches/701-pppd-Fix-bounds-check-in-EAP-code.patch [deleted file]
package/network/services/ppp/patches/702-pppd-Ignore-received-EAP-messages-when-not-doing-EAP.patch [deleted file]

index 9e42cb74374532fa32fc7042157b5c8d8085b3c9..03f88e13ac121987504e0227388dae476d064c53 100644 (file)
@@ -13,14 +13,15 @@ PKG_RELEASE:=2
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/paulusmack/ppp
-PKG_SOURCE_VERSION:=78cd384ce0f48bb5edb84e4fe9a574eab4a4ad14
+PKG_SOURCE_DATE:=2020-03-21
+PKG_SOURCE_VERSION:=41a73232c16e9a063cfe3fad461c94af3f450f6c
 PKG_MIRROR_HASH:=cf284c312b0c90974d11f8aeece173bcac8475f5b810911f4feb2c5a4db263fe
 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
 PKG_LICENSE:=BSD-4-Clause
 PKG_CPE_ID:=cpe:/a:samba:ppp
 
 PKG_RELEASE_VERSION:=2.4.8
-PKG_VERSION:=$(PKG_RELEASE_VERSION)
+PKG_VERSION:=$(PKG_RELEASE_VERSION).git-$(PKG_SOURCE_DATE)
 
 PKG_BUILD_DEPENDS:=libpcap
 
index 82b1cc67b966f76d2c5cc4635ff98e758712a50c..42351392dc706b122c1c140a84e62d8b8fe1bbd9 100644 (file)
@@ -34,7 +34,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
  
  CFLAGS= $(COPTS) $(COMPILE_FLAGS) $(INCLUDE_DIRS) '-DDESTDIR="@DESTDIR@"'
  
-@@ -125,10 +125,10 @@ CFLAGS   += -DHAS_SHADOW
+@@ -126,10 +126,10 @@ CFLAGS   += -DHAS_SHADOW
  #LIBS     += -lshadow $(LIBS)
  endif
  
index 436085f3b30d3b0c571ea645000c035e2be652a5..0af7b2b2abdf54cec5a03e6d7672490f0c8d6342 100644 (file)
@@ -19,7 +19,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
  clean:
 --- a/pppd/Makefile.linux
 +++ b/pppd/Makefile.linux
-@@ -107,7 +107,7 @@ ifdef USE_SRP
+@@ -108,7 +108,7 @@ ifdef USE_SRP
  CFLAGS        += -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include
  LIBS  += -lsrp -L/usr/local/ssl/lib -lcrypto
  TARGETS       += srp-entry
@@ -28,7 +28,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
  MANPAGES += srp-entry.8
  EXTRACLEAN += srp-entry.o
  NEEDDES=y
-@@ -219,7 +219,7 @@ all: $(TARGETS)
+@@ -220,7 +220,7 @@ all: $(TARGETS)
  install: pppd
        mkdir -p $(BINDIR) $(MANDIR)
        $(EXTRAINSTALL)
index 00fb835029caf142d9b1116a91e5412092a2ac36..40866132e8a8e8387ce5cb42e8728a703d16d90f 100644 (file)
@@ -7,7 +7,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
 
 --- a/pppd/Makefile.linux
 +++ b/pppd/Makefile.linux
-@@ -189,8 +189,8 @@ endif
+@@ -190,8 +190,8 @@ endif
  
  ifdef FILTER
  ifneq ($(wildcard /usr/include/pcap-bpf.h),)
index a65c19cf1cfb08a6f746cf5d06db35f66c8a490b..ec6110442352b1dbcb26d0ae3c168e1aa6f0383b 100644 (file)
@@ -23,7 +23,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
  # Uncomment the next line to enable multilink PPP (enabled by default)
  # Linux distributions: Please leave multilink ENABLED in your builds
  # of pppd!
-@@ -194,6 +197,14 @@ CFLAGS  += -DPPP_FILTER -I$(STAGING_DIR)
+@@ -195,6 +198,14 @@ CFLAGS  += -DPPP_FILTER -I$(STAGING_DIR)
  endif
  endif
  
@@ -77,7 +77,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
  #ifdef MAXOCTETS
      { "maxoctets", o_int, &maxoctets,
        "Set connection traffic limit",
-@@ -1511,6 +1527,29 @@ callfile(argv)
+@@ -1516,6 +1532,29 @@ callfile(argv)
      return ok;
  }
  
index 9676824f5fa936a6aaf7bd3f49426ea2d267a6b6..331ec09ed2590beff3ea09b97e05acc3521c5578 100644 (file)
@@ -28,7 +28,7 @@ This reverts commit 3c7b86229f7bd2600d74db14b1fe5b3896be3875.
  # Don't use MSLANMAN unless you really know what you're doing.
  #MSLANMAN=y
  # Uncomment the next line to include support for MPPE.  CHAPMS (above) must
-@@ -140,8 +140,7 @@ endif
+@@ -141,8 +141,7 @@ endif
  
  ifdef NEEDDES
  ifndef USE_CRYPT
diff --git a/package/network/services/ppp/patches/700-radius-Prevent-buffer-overflow-in-rc_mksid.patch b/package/network/services/ppp/patches/700-radius-Prevent-buffer-overflow-in-rc_mksid.patch
deleted file mode 100644 (file)
index 1c5722e..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-From 858976b1fc3107f1261aae337831959b511b83c2 Mon Sep 17 00:00:00 2001
-From: Paul Mackerras <paulus@ozlabs.org>
-Date: Sat, 4 Jan 2020 12:01:32 +1100
-Subject: [PATCH] radius: Prevent buffer overflow in rc_mksid()
-
-On some systems getpid() can return a value greater than 65535.
-Increase the size of buf[] to allow for this, and use slprintf()
-to make sure we never overflow it.
-
-Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
----
- pppd/plugins/radius/util.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/pppd/plugins/radius/util.c b/pppd/plugins/radius/util.c
-index 6f976a712951..740131e8377c 100644
---- a/pppd/plugins/radius/util.c
-+++ b/pppd/plugins/radius/util.c
-@@ -73,9 +73,9 @@ void rc_mdelay(int msecs)
- char *
- rc_mksid (void)
- {
--  static char buf[15];
-+  static char buf[32];
-   static unsigned short int cnt = 0;
--  sprintf (buf, "%08lX%04X%02hX",
-+  slprintf(buf, sizeof(buf), "%08lX%04X%02hX",
-          (unsigned long int) time (NULL),
-          (unsigned int) getpid (),
-          cnt & 0xFF);
diff --git a/package/network/services/ppp/patches/701-pppd-Fix-bounds-check-in-EAP-code.patch b/package/network/services/ppp/patches/701-pppd-Fix-bounds-check-in-EAP-code.patch
deleted file mode 100644 (file)
index c2ca972..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-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 94407f56a336..1b93db01aebd 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/network/services/ppp/patches/702-pppd-Ignore-received-EAP-messages-when-not-doing-EAP.patch b/package/network/services/ppp/patches/702-pppd-Ignore-received-EAP-messages-when-not-doing-EAP.patch
deleted file mode 100644 (file)
index 7286d81..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-From 8d45443bb5c9372b4c6a362ba2f443d41c5636af Mon Sep 17 00:00:00 2001
-From: Paul Mackerras <paulus@ozlabs.org>
-Date: Mon, 3 Feb 2020 16:31:42 +1100
-Subject: [PATCH] pppd: Ignore received EAP messages when not doing EAP
-
-This adds some basic checks to the subroutines of eap_input to check
-that we have requested or agreed to doing EAP authentication before
-doing any processing on the received packet.  The motivation is to
-make it harder for a malicious peer to disrupt the operation of pppd
-by sending unsolicited EAP packets.  Note that eap_success() already
-has a check that the EAP client state is reasonable, and does nothing
-(apart from possibly printing a debug message) if not.
-
-Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
----
- pppd/eap.c | 18 ++++++++++++++++++
- 1 file changed, 18 insertions(+)
-
-diff --git a/pppd/eap.c b/pppd/eap.c
-index 1b93db01aebd..082e95343120 100644
---- a/pppd/eap.c
-+++ b/pppd/eap.c
-@@ -1328,6 +1328,12 @@ int len;
-       int fd;
- #endif /* USE_SRP */
-+      /*
-+       * Ignore requests if we're not open
-+       */
-+      if (esp->es_client.ea_state <= eapClosed)
-+              return;
-+
-       /*
-        * Note: we update es_client.ea_id *only if* a Response
-        * message is being generated.  Otherwise, we leave it the
-@@ -1736,6 +1742,12 @@ int len;
-       u_char dig[SHA_DIGESTSIZE];
- #endif /* USE_SRP */
-+      /*
-+       * Ignore responses if we're not open
-+       */
-+      if (esp->es_server.ea_state <= eapClosed)
-+              return;
-+
-       if (esp->es_server.ea_id != id) {
-               dbglog("EAP: discarding Response %d; expected ID %d", id,
-                   esp->es_server.ea_id);
-@@ -2047,6 +2059,12 @@ u_char *inp;
- int id;
- int len;
- {
-+      /*
-+       * Ignore failure messages if we're not open
-+       */
-+      if (esp->es_client.ea_state <= eapClosed)
-+              return;
-+
-       if (!eap_client_active(esp)) {
-               dbglog("EAP unexpected failure message in state %s (%d)",
-                   eap_state_name(esp->es_client.ea_state),