Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7]: src Pullup the import of pppd 2.4.7, requested by christos in...
details: https://anonhg.NetBSD.org/src/rev/179637fe546c
branches: netbsd-7
changeset: 798723:179637fe546c
user: martin <martin%NetBSD.org@localhost>
date: Wed Dec 17 19:25:39 2014 +0000
description:
Pullup the import of pppd 2.4.7, requested by christos in #331:
* Fixed a potential security issue in parsing option files
(CVE-2014-3158).
* There is a new "stop-bits" option, which takes an argument of
1 or 2, indicating the number of stop bits to use for async
serial ports.
* Various bug fixes.
diffstat:
doc/3RDPARTY | 6 +-
external/bsd/ppp/dist/README | 32 +++-
external/bsd/ppp/dist/pppd/chap_ms.c | 6 +-
external/bsd/ppp/dist/pppd/ipcp.c | 23 ++-
external/bsd/ppp/dist/pppd/ipv6cp.c | 62 +-----
external/bsd/ppp/dist/pppd/ipv6cp.h | 4 +-
external/bsd/ppp/dist/pppd/options.c | 19 +-
external/bsd/ppp/dist/pppd/patchlevel.h | 6 +-
external/bsd/ppp/dist/pppd/plugins/pppol2tp/pppol2tp.c | 30 +-
external/bsd/ppp/dist/pppd/pppd.h | 5 +-
external/bsd/ppp/dist/pppd/tty.c | 8 +-
external/bsd/ppp/dist/pppd/utils.c | 6 +-
external/bsd/ppp/ppp2netbsd | 9 +-
external/bsd/ppp/usr.sbin/pppd/sys-bsd.c | 163 +++++++++++++---
14 files changed, 248 insertions(+), 131 deletions(-)
diffs (truncated from 753 to 300 lines):
diff -r 5003da44c83a -r 179637fe546c doc/3RDPARTY
--- a/doc/3RDPARTY Wed Dec 17 18:47:34 2014 +0000
+++ b/doc/3RDPARTY Wed Dec 17 19:25:39 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: 3RDPARTY,v 1.1145.2.2 2014/11/18 18:32:29 snj Exp $
+# $NetBSD: 3RDPARTY,v 1.1145.2.3 2014/12/17 19:25:39 martin Exp $
#
# This file contains a list of the software that has been integrated into
# NetBSD where we are not the primary maintainer.
@@ -1118,8 +1118,8 @@
set-permissions'').
Package: ppp
-Version: 2.4.5
-Current Vers: 2.4.6
+Version: 2.4.7
+Current Vers: 2.4.7
Maintainer: Paul Mackerras <paulus%samba.org@localhost>
Archive Site: ftp://ftp.samba.org/pub/ppp/
Home Page:
diff -r 5003da44c83a -r 179637fe546c external/bsd/ppp/dist/README
--- a/external/bsd/ppp/dist/README Wed Dec 17 18:47:34 2014 +0000
+++ b/external/bsd/ppp/dist/README Wed Dec 17 19:25:39 2014 +0000
@@ -61,9 +61,39 @@
authenticating itself to you, of course.)
-What's new in ppp-2.4.5.
+What's new in ppp-2.4.7.
************************
+* Fixed a potential security issue in parsing option files (CVE-2014-3158).
+
+* There is a new "stop-bits" option, which takes an argument of 1 or 2,
+ indicating the number of stop bits to use for async serial ports.
+
+* Various bug fixes.
+
+
+What was new in ppp-2.4.6.
+**************************
+
+* Man page updates.
+
+* Several bug fixes.
+
+* Options files can now set and unset environment variables for
+ scripts.
+
+* The timeout for chat scripts can now be taken from an environment
+ variable.
+
+* There is a new option, master_detach, which allows pppd to detach
+ from the controlling terminal when it is the multilink bundle master
+ but its own link has terminated, even if the nodetach option has
+ been given.
+
+
+What was new in ppp-2.4.5.
+**************************
+
* Under Linux, pppd can now operate in a mode where it doesn't request
the peer's IP address, as some peers refuse to supply an IP address.
Since Linux supports device routes as well as gateway routes, it's
diff -r 5003da44c83a -r 179637fe546c external/bsd/ppp/dist/pppd/chap_ms.c
--- a/external/bsd/ppp/dist/pppd/chap_ms.c Wed Dec 17 18:47:34 2014 +0000
+++ b/external/bsd/ppp/dist/pppd/chap_ms.c Wed Dec 17 19:25:39 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: chap_ms.c,v 1.2 2013/11/28 22:33:42 christos Exp $ */
+/* $NetBSD: chap_ms.c,v 1.2.6.1 2014/12/17 19:25:40 martin Exp $ */
/*
* chap_ms.c - Microsoft MS-CHAP compatible implementation.
@@ -81,7 +81,7 @@
#define RCSID "Id: chap_ms.c,v 1.38 2007/12/01 20:10:51 carlsonj Exp "
static const char rcsid[] = RCSID;
#else
-__RCSID("$NetBSD: chap_ms.c,v 1.2 2013/11/28 22:33:42 christos Exp $");
+__RCSID("$NetBSD: chap_ms.c,v 1.2.6.1 2014/12/17 19:25:40 martin Exp $");
#endif
#ifdef CHAPMS
@@ -391,7 +391,7 @@
unsigned char *private)
{
const struct chapms2_response_cache_entry *cache_entry;
- unsigned char auth_response[MS_AUTH_RESPONSE_LENGTH];
+ unsigned char auth_response[MS_AUTH_RESPONSE_LENGTH+1];
challenge++; /* skip length, should be 16 */
*response++ = MS_CHAP2_RESPONSE_LEN;
diff -r 5003da44c83a -r 179637fe546c external/bsd/ppp/dist/pppd/ipcp.c
--- a/external/bsd/ppp/dist/pppd/ipcp.c Wed Dec 17 18:47:34 2014 +0000
+++ b/external/bsd/ppp/dist/pppd/ipcp.c Wed Dec 17 19:25:39 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ipcp.c,v 1.2 2013/11/28 22:33:42 christos Exp $ */
+/* $NetBSD: ipcp.c,v 1.2.6.1 2014/12/17 19:25:40 martin Exp $ */
/*
* ipcp.c - PPP IP Control Protocol.
@@ -47,7 +47,7 @@
#define RCSID "Id: ipcp.c,v 1.73 2008/05/26 08:33:22 paulus Exp "
static const char rcsid[] = RCSID;
#else
-__RCSID("$NetBSD: ipcp.c,v 1.2 2013/11/28 22:33:42 christos Exp $");
+__RCSID("$NetBSD: ipcp.c,v 1.2.6.1 2014/12/17 19:25:40 martin Exp $");
#endif
/*
@@ -969,6 +969,21 @@
goto bad; \
}
+#define ACKCIWINS(opt, addr) \
+ if (addr) { \
+ u_int32_t l; \
+ if ((len -= CILEN_ADDR) < 0) \
+ goto bad; \
+ GETCHAR(citype, p); \
+ GETCHAR(cilen, p); \
+ if (cilen != CILEN_ADDR || citype != opt) \
+ goto bad; \
+ GETLONG(l, p); \
+ cilong = htonl(l); \
+ if (addr != cilong) \
+ goto bad; \
+ }
+
ACKCIADDRS(CI_ADDRS, !go->neg_addr && go->old_addrs, go->ouraddr,
go->hisaddr);
@@ -981,6 +996,10 @@
ACKCIDNS(CI_MS_DNS2, go->req_dns2, go->dnsaddr[1]);
+ ACKCIWINS(CI_MS_WINS1, go->winsaddr[0]);
+
+ ACKCIWINS(CI_MS_WINS2, go->winsaddr[1]);
+
/*
* If there are any remaining CIs, then this packet is bad.
*/
diff -r 5003da44c83a -r 179637fe546c external/bsd/ppp/dist/pppd/ipv6cp.c
--- a/external/bsd/ppp/dist/pppd/ipv6cp.c Wed Dec 17 18:47:34 2014 +0000
+++ b/external/bsd/ppp/dist/pppd/ipv6cp.c Wed Dec 17 19:25:39 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ipv6cp.c,v 1.2 2013/11/28 22:33:42 christos Exp $ */
+/* $NetBSD: ipv6cp.c,v 1.2.6.1 2014/12/17 19:25:40 martin Exp $ */
/*
* ipv6cp.c - PPP IPV6 Control Protocol.
@@ -145,7 +145,7 @@
#define RCSID "Id: ipv6cp.c,v 1.21 2005/08/25 23:59:34 paulus Exp "
static const char rcsid[] = RCSID;
#else
-__RCSID("$NetBSD: ipv6cp.c,v 1.2 2013/11/28 22:33:42 christos Exp $");
+__RCSID("$NetBSD: ipv6cp.c,v 1.2.6.1 2014/12/17 19:25:40 martin Exp $");
#endif
/*
@@ -257,10 +257,8 @@
{ "ipv6cp-use-ipaddr", o_bool, &ipv6cp_allowoptions[0].use_ip,
"Use (default) IPv4 address as interface identifier", 1 },
-#if defined(SOL2) || defined(__linux__)
{ "ipv6cp-use-persistent", o_bool, &ipv6cp_wantoptions[0].use_persistent,
"Use uniquely-available persistent value for link local address", 1 },
-#endif /* defined(SOL2) */
{ "ipv6cp-restart", o_int, &ipv6cp_fsm[0].timeouttime,
"Set timeout for IPv6CP", OPT_PRIO },
@@ -1096,7 +1094,6 @@
if (!ipv6cp_protent.enabled_flag)
return;
-#if defined(SOL2) || defined(__linux__)
/*
* Persistent link-local id is only used when user has not explicitly
* configure/hard-code the id
@@ -1116,7 +1113,6 @@
wo->opt_local = 1;
}
}
-#endif
if (!wo->opt_local) { /* init interface identifier */
if (wo->use_ip && eui64_iszero(wo->ourid)) {
@@ -1154,15 +1150,8 @@
{
ipv6cp_options *wo = &ipv6cp_wantoptions[u];
-#if defined(__linux__) || defined(SOL2) || (defined(SVR4) && (defined(SNI) || defined(__USLC__)))
-#if defined(SOL2)
if (!sif6up(u))
return 0;
-#else
- if (!sifup(u))
- return 0;
-#endif /* defined(SOL2) */
-#endif
if (!sif6addr(u, wo->ourid, wo->hisid))
return 0;
#if !defined(__linux__) && !(defined(SVR4) && (defined(SNI) || defined(__USLC__)))
@@ -1255,43 +1244,20 @@
sifnpmode(f->unit, PPP_IPV6, NPMODE_PASS);
} else {
- /*
- * Set LL addresses
- */
-#if !defined(__linux__) && !defined(SOL2) && !(defined(SVR4) && (defined(SNI) || defined(__USLC__)))
+ /* bring the interface up for IPv6 */
+ if (!sif6up(f->unit)) {
+ if (debug)
+ warn("sif6up failed (IPV6)");
+ ipv6cp_close(f->unit, "Interface configuration failed");
+ return;
+ }
+
if (!sif6addr(f->unit, go->ourid, ho->hisid)) {
if (debug)
warn("sif6addr failed");
ipv6cp_close(f->unit, "Interface configuration failed");
return;
}
-#endif
-
- /* bring the interface up for IPv6 */
-#if defined(SOL2)
- if (!sif6up(f->unit)) {
- if (debug)
- warn("sifup failed (IPV6)");
- ipv6cp_close(f->unit, "Interface configuration failed");
- return;
- }
-#else
- if (!sifup(f->unit)) {
- if (debug)
- warn("sifup failed (IPV6)");
- ipv6cp_close(f->unit, "Interface configuration failed");
- return;
- }
-#endif /* defined(SOL2) */
-
-#if defined(__linux__) || defined(SOL2) || (defined(SVR4) && (defined(SNI) || defined(__USLC__)))
- if (!sif6addr(f->unit, go->ourid, ho->hisid)) {
- if (debug)
- warn("sif6addr failed");
- ipv6cp_close(f->unit, "Interface configuration failed");
- return;
- }
-#endif
sifnpmode(f->unit, PPP_IPV6, NPMODE_PASS);
notice("local LL address %s", llv6_ntoa(go->ourid));
@@ -1348,16 +1314,14 @@
} else {
sifnpmode(f->unit, PPP_IPV6, NPMODE_DROP);
#if !defined(__linux__) && !(defined(SVR4) && (defined(SNI) || defined(__USLC)))
-#if defined(SOL2)
sif6down(f->unit);
-#else
- sifdown(f->unit);
-#endif /* defined(SOL2) */
#endif
ipv6cp_clear_addrs(f->unit,
ipv6cp_gotoptions[f->unit].ourid,
ipv6cp_hisoptions[f->unit].hisid);
-#if defined(__linux__) || (defined(SVR4) && (defined(SNI) || defined(__USLC)))
+#if defined(__linux__)
+ sif6down(f->unit);
+#elif defined(SVR4) && (defined(SNI) || defined(__USLC))
sifdown(f->unit);
#endif
}
diff -r 5003da44c83a -r 179637fe546c external/bsd/ppp/dist/pppd/ipv6cp.h
--- a/external/bsd/ppp/dist/pppd/ipv6cp.h Wed Dec 17 18:47:34 2014 +0000
+++ b/external/bsd/ppp/dist/pppd/ipv6cp.h Wed Dec 17 19:25:39 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ipv6cp.h,v 1.2 2013/11/28 22:33:42 christos Exp $ */
+/* $NetBSD: ipv6cp.h,v 1.2.6.1 2014/12/17 19:25:40 martin Exp $ */
/*
* ipv6cp.h - PPP IPV6 Control Protocol.
@@ -156,9 +156,7 @@
int opt_local; /* ourtoken set by option */
int opt_remote; /* histoken set by option */
int use_ip; /* use IP as interface identifier */
-#if defined(SOL2) || defined(__linux__)
int use_persistent; /* use uniquely persistent value for address */
-#endif /* defined(SOL2) */
int neg_vj; /* Van Jacobson Compression? */
u_short vj_protocol; /* protocol value to use in VJ option */
eui64_t ourid, hisid; /* Interface identifiers */
diff -r 5003da44c83a -r 179637fe546c external/bsd/ppp/dist/pppd/options.c
--- a/external/bsd/ppp/dist/pppd/options.c Wed Dec 17 18:47:34 2014 +0000
+++ b/external/bsd/ppp/dist/pppd/options.c Wed Dec 17 19:25:39 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: options.c,v 1.2 2013/11/28 22:33:42 christos Exp $ */
+/* $NetBSD: options.c,v 1.2.6.1 2014/12/17 19:25:40 martin Exp $ */
Home |
Main Index |
Thread Index |
Old Index