From: Hans Dedecker Date: Sun, 5 Apr 2020 20:26:33 +0000 (+0200) Subject: ppp: update to version 2.4.8.git-2020-03-21 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=ae06a650d68026530beec4196869706866c2e4b1;p=openwrt%2Fstaging%2Frmilecki.git ppp: update to version 2.4.8.git-2020-03-21 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 --- diff --git a/package/network/services/ppp/Makefile b/package/network/services/ppp/Makefile index 9e42cb74374..03f88e13ac1 100644 --- a/package/network/services/ppp/Makefile +++ b/package/network/services/ppp/Makefile @@ -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 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 diff --git a/package/network/services/ppp/patches/200-makefile.patch b/package/network/services/ppp/patches/200-makefile.patch index 82b1cc67b96..42351392dc7 100644 --- a/package/network/services/ppp/patches/200-makefile.patch +++ b/package/network/services/ppp/patches/200-makefile.patch @@ -34,7 +34,7 @@ Signed-off-by: Jo-Philipp Wich 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 diff --git a/package/network/services/ppp/patches/202-no_strip.patch b/package/network/services/ppp/patches/202-no_strip.patch index 436085f3b30..0af7b2b2abd 100644 --- a/package/network/services/ppp/patches/202-no_strip.patch +++ b/package/network/services/ppp/patches/202-no_strip.patch @@ -19,7 +19,7 @@ Signed-off-by: Jo-Philipp Wich 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 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) diff --git a/package/network/services/ppp/patches/300-filter-pcap-includes-lib.patch b/package/network/services/ppp/patches/300-filter-pcap-includes-lib.patch index 00fb835029c..40866132e8a 100644 --- a/package/network/services/ppp/patches/300-filter-pcap-includes-lib.patch +++ b/package/network/services/ppp/patches/300-filter-pcap-includes-lib.patch @@ -7,7 +7,7 @@ Signed-off-by: Jo-Philipp Wich --- 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),) diff --git a/package/network/services/ppp/patches/310-precompile_filter.patch b/package/network/services/ppp/patches/310-precompile_filter.patch index a65c19cf1cf..ec611044235 100644 --- a/package/network/services/ppp/patches/310-precompile_filter.patch +++ b/package/network/services/ppp/patches/310-precompile_filter.patch @@ -23,7 +23,7 @@ Signed-off-by: Jo-Philipp Wich # 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 #ifdef MAXOCTETS { "maxoctets", o_int, &maxoctets, "Set connection traffic limit", -@@ -1511,6 +1527,29 @@ callfile(argv) +@@ -1516,6 +1532,29 @@ callfile(argv) return ok; } diff --git a/package/network/services/ppp/patches/600-Revert-pppd-Use-openssl-for-the-DES-instead-of-the-l.patch b/package/network/services/ppp/patches/600-Revert-pppd-Use-openssl-for-the-DES-instead-of-the-l.patch index 9676824f5fa..331ec09ed25 100644 --- a/package/network/services/ppp/patches/600-Revert-pppd-Use-openssl-for-the-DES-instead-of-the-l.patch +++ b/package/network/services/ppp/patches/600-Revert-pppd-Use-openssl-for-the-DES-instead-of-the-l.patch @@ -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 index 1c5722e6dd3..00000000000 --- a/package/network/services/ppp/patches/700-radius-Prevent-buffer-overflow-in-rc_mksid.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 858976b1fc3107f1261aae337831959b511b83c2 Mon Sep 17 00:00:00 2001 -From: Paul Mackerras -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 ---- - 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 index c2ca9729ec3..00000000000 --- a/package/network/services/ppp/patches/701-pppd-Fix-bounds-check-in-EAP-code.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 8d7970b8f3db727fe798b65f3377fe6787575426 Mon Sep 17 00:00:00 2001 -From: Paul Mackerras -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 -Signed-off-by: Paul Mackerras ---- - 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 index 7286d81a569..00000000000 --- a/package/network/services/ppp/patches/702-pppd-Ignore-received-EAP-messages-when-not-doing-EAP.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 8d45443bb5c9372b4c6a362ba2f443d41c5636af Mon Sep 17 00:00:00 2001 -From: Paul Mackerras -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 ---- - 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),