0
0
mirror of https://github.com/OpenVPN/openvpn.git synced 2024-09-20 03:52:28 +02:00
Commit Graph

460 Commits

Author SHA1 Message Date
Gert Doering
b5da875c06 Fix problem with special case route targets ('remote_host')
The init_route() function will leave &netlist untouched for
get_special_addr() routes ("remote_host" being one of them).
netlist is on stack,  contains random garbage, and netlist.len
will not be 0 - thus, random stack data is copied from
netlist.data[] until the route_list is full.

This issue has been reported several places lately:
   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=600166
   http://thread.gmane.org/gmane.network.openvpn.devel/4083
   https://forums.openvpn.net/viewtopic.php?f=1&t=7201&p=8168

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: David Sommerseth <dazo@users.sourceforge.net>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
(cherry picked from commit 59afc4a5f7)
2010-11-04 20:29:53 +01:00
James Yonan
5f866d914c Attempt to fix issue where domake-win build system was not properly
signing drivers and .exe files.

Added win/tap_span.py for building multiple versions of the TAP driver
and tapinstall binaries using different DDK versions to span from Win2K
to Win7 and beyond.

Version 2.1.3


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6404 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-08-20 20:24:42 +00:00
James Yonan
4f79d3ec45 Windows security issue:
Fixed potential local privilege escalation vulnerability in
Windows service. The Windows service did not properly quote the
executable filename passed to CreateService.  A local attacker
with write access to the root directory C:\ could create an
executable that would be run with the same privilege level as
the OpenVPN Windows service.  However, since non-Administrative
users normally lack write permission on C:\, this vulnerability
is generally not exploitable except on older versions of Windows
(such as Win2K) where the default permissions on C:\ would allow
any user to create files there.
Credit:  Scott Laurie, MWR InfoSecurity

Version 2.1.2


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6400 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-08-15 21:53:00 +00:00
James Yonan
379b549c81 Added warning about tls-remote in man page.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6384 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-08-10 17:31:31 +00:00
James Yonan
fe7c58f0d2 Distribute win directory (Python/MSVC-based build system)
in "make dist" tarball.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6382 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-08-09 20:15:27 +00:00
James Yonan
75dfe3d7f7 Added "net stop dnscache" and "net start dnscache" in front
of existing --register-dns commands.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6352 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-07-27 21:46:34 +00:00
James Yonan
dc85dae67f Fixed an issue where application payload transmissions on the
TLS control channel (such as AUTH_FAILED) that occur during
or immediately after a TLS renegotiation might be dropped. 

Version 2.1.1n


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6350 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-07-27 07:10:01 +00:00
James Yonan
1400e1c156 Fixed typo: missing comment close.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6347 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-07-26 18:26:49 +00:00
James Yonan
57346f568b Added win/build_exe.py script, which is similar to
win/build_all.py except that it doesn't build the
TAP drivers or tapinstall.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6306 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-07-16 19:08:35 +00:00
James Yonan
b90c6f17b4 Added --register-dns option for Windows.
Fixed some issues on Windows with --log, subprocess creation
for command execution, and stdout/stderr redirection.

Version 2.1.1m.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6304 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-07-16 18:01:11 +00:00
James Yonan
f9b2ada0ee Implemented multi-address DNS expansion on the network field of route
commands.

When only a single IP address is desired from a multi-address DNS
expansion, use the first address rather than a random selection.

Version 2.1.1l


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6291 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-07-12 01:55:54 +00:00
James Yonan
9c110e877c Version 2.1.1k
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6285 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-07-10 03:13:25 +00:00
James Yonan
3796f902a6 Fixed bug in proxy fallback capability where openvpn.exe could
core dump if http-proxy-fallback-disable command was issued in
response to ">PROXY:NEED_NOW management" interface notification.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6284 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-07-10 03:04:27 +00:00
James Yonan
941132efc7 Added support for MSVC debugging of openvpn.exe in settings.in:
# Build debugging version of openvpn.exe
  !define PRODUCT_OPENVPN_DEBUG


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6283 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-07-10 03:00:08 +00:00
James Yonan
d222fcc587 Fixed issue where bad creds provided by the management interface
for HTTP Proxy Basic Authentication would go into an infinite
retry-fail loop instead of requerying the management interface for
new creds.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5701 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-06-10 03:17:21 +00:00
James Yonan
aaf7297467 Implemented a key/value auth channel from client to server.
Version 2.1.1i


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5668 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-06-01 07:12:27 +00:00
James Yonan
3cf6c93282 Implemented http-proxy-override and http-proxy-fallback directives to make it
easier for OpenVPN client UIs to start a pre-existing client config file with
proxy options, or to adaptively fall back to a proxy connection if a direct
connection fails.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5652 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-05-24 22:51:16 +00:00
James Yonan
484e9d36d0 Minor fixes to recent HTTP proxy changes:
* use strcasecmp instead of stricmp

* define HASH and HASHHEX as unsigned char to avoid compiler
  warnings


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5629 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-05-11 19:47:03 +00:00
James Yonan
b27dc04c36 Proxy improvements:
Improved the ability of http-auth "auto" flag to dynamically detect
the auth method required by the proxy.

Added http-auth "auto-nct" flag to reject weak proxy auth methods.

Added HTTP proxy digest authentication method.

Removed extraneous openvpn_sleep calls from proxy.c.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5628 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-05-11 19:32:41 +00:00
James Yonan
8db6234db7 Fixed issue on Windows with MSVC compiler, where TCP_NODELAY support
was not being compiled in.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5620 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-05-09 00:03:42 +00:00
James Yonan
564a21094e Updated copyright date to 2010.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5599 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-04-28 16:31:36 +00:00
James Yonan
059739e934 Added Python-based build system for Windows in
win directory.

Fixed minor issue in TAP driver DEBUG builds where
non-null-terminated unicode strings were being
printed incorrectly.

Version 2.1.1g


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5577 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-04-22 12:53:31 +00:00
James Yonan
7a464e3239 Minor change to doclean script:
Don't delete config-win32.h, because this is now a true source file
and no longer a generated file.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5558 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-04-17 02:23:50 +00:00
James Yonan
7e1c085d76 Management interface performance optimizations:
* Added env-filter MI command to perform filtering on env vars
  passed through as a part of --management-client-auth

* man_write will now try to aggregate output into larger blocks
  (up to 1024 bytes) for more efficient i/o

Version 2.1.1f


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5557 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-04-16 07:04:45 +00:00
James Yonan
74fce85ee8 Updated MSVC build scripts to Visual Studio 2008:
python msvc\config.py
  nmake /f msvc\msvc.mak

Version 2.1.1e


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5516 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-03-31 06:38:21 +00:00
James Yonan
2b9b4c8a2d Set socket buffers (SO_SNDBUF and SO_RCVBUF) immediately after
socket is created rather than waiting until after connect/listen.

Version 2.1.1d


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5514 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-03-30 04:20:55 +00:00
James Yonan
8c47de7dce Version 2.1.1c
Enable exponential backoff in reliability layer
retransmits.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5490 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-03-17 18:54:47 +00:00
James Yonan
8c7c6be489 Modified ">PASSWORD:Verification Failed" management interface
notification to include a client reason string:

  >PASSWORD:Verification Failed: 'AUTH_TYPE' ['REASON_STRING']


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5468 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-03-12 03:05:34 +00:00
James Yonan
fdda3135a8 Added stub directive "remote-ip-hint".
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5467 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-03-12 03:00:41 +00:00
James Yonan
6624b87753 Trivial fix to proxy.c -- #define proxy auth type as UP_TYPE_PROXY.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5466 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-03-12 02:59:17 +00:00
James Yonan
112e6704c9 Fixed an issue where if reneg-sec was set to 0 on the client,
so that the server-side value would take precedence,
the auth_deferred_expire_window function would incorrectly
return a window period of 0 seconds.  In this case, the
correct window period should be the handshake window
period.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5464 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-03-06 15:38:23 +00:00
James Yonan
3a37ffbe89 Fixed an issue in the Management Interface that could cause
a process hang with 100% CPU utilization in --management-client
mode if the management interface client disconnected at the
point where credentials are queried.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5458 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-02-26 10:26:45 +00:00
james
1b98341fd5 Version 2.1.1b
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5371 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-01-16 04:10:30 +00:00
james
ba30bc2251 Don't advance the connection list on AUTH_FAILED errors.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5370 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-01-16 03:54:00 +00:00
james
a345b41eba Fixed an issue where AUTH_FAILED was not being properly delivered
to the client when a bad password is given for mid-session reauth.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5369 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-01-16 03:24:07 +00:00
james
0c9eb1d3b3 When aborting in a non-graceful way, try to execute do_close_tun in
init.c prior to daemon exit to ensure that the tun/tap interface is
closed and any added routes are deleted.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5367 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-01-12 18:26:22 +00:00
james
0777d054cd Fixed some breakage in openvpn.spec (which is required to build an
RPM distribution) where it was referencing a non-existent
subdirectory in the tarball, causing it to fail (patch from
David Sommerseth).

Version 2.1.1.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5269 e7ae566f-a301-0410-adde-c780ea21d3b5
2009-12-11 23:44:34 +00:00
james
4580320b22 Version 2.1.0
* Updated ChangeLog.

* Note in man page that clients connecting to a --multihome server
  should always use the --nobind option.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5266 e7ae566f-a301-0410-adde-c780ea21d3b5
2009-12-11 08:18:50 +00:00
james
e54724b077 Clarified that TAP-Win32 driver is licensed under GPL 2.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5265 e7ae566f-a301-0410-adde-c780ea21d3b5
2009-12-11 05:13:24 +00:00
james
16ded86c20 Documented --multihome in the man page.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5264 e7ae566f-a301-0410-adde-c780ea21d3b5
2009-12-11 01:47:26 +00:00
james
5bb8bfea43 Fixed a couple issues in sample plugins auth-pam.c and down-root.c:
1. Fail gracefully rather than segfault if calloc returns NULL.

2. The openvpn_plugin_abort_v1 function can potentially be called
   with handle == NULL.  Add code to detect this case, and if
   so, avoid dereferencing pointers derived from handle.

(Thanks to David Sommerseth for finding this bug).


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5261 e7ae566f-a301-0410-adde-c780ea21d3b5
2009-12-10 23:50:03 +00:00
james
1852709cd5 Version 2.1_rc22
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5169 e7ae566f-a301-0410-adde-c780ea21d3b5
2009-11-20 13:22:27 +00:00
james
5c30df12ae Fixed a client-side bug that occurred when the "dhcp-pre-release"
or "dhcp-renew" options were combined with "route-gateway dhcp".

The problem is that the IP Helper functions for DHCP release and
renew are blocking, and so calling them from a single-threaded
client stops tunnel traffic forwarding, and hence breaks
"route-gateway dhcp" which requires an active tunnel.  The fix is
to call the IP Helper functions for DHCP release and renew from
another process.

Version 2.1_rc21b.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5164 e7ae566f-a301-0410-adde-c780ea21d3b5
2009-11-19 16:42:51 +00:00
james
b9437c64dd Increase MAX_CERT_DEPTH to 16 (from 8), and when exceeded,
make it a hard failure, rather than just a warning.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5159 e7ae566f-a301-0410-adde-c780ea21d3b5
2009-11-13 11:09:47 +00:00
james
311ea893aa Version 2.1_rc21
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5152 e7ae566f-a301-0410-adde-c780ea21d3b5
2009-11-12 09:30:45 +00:00
james
6eb2a9b1ca Version 2.1_rc20a
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5106 e7ae566f-a301-0410-adde-c780ea21d3b5
2009-10-25 15:54:01 +00:00
james
ec4a500bb4 On server, lock client-provided certs against mid-session TLS
renegotiations -- this is similer to how the common name is also
locked.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5105 e7ae566f-a301-0410-adde-c780ea21d3b5
2009-10-25 15:51:04 +00:00
james
0c7168e259 Change to doval valgrind script. The openvpn command parameter is now
implied, so new usage is:

  ./doval [openvpn parms]

instead of:

  ./doval ./openvpn [openvpn parms]


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5104 e7ae566f-a301-0410-adde-c780ea21d3b5
2009-10-25 15:44:28 +00:00
james
71b557ba9d On server, lock session username against changes in mid-session TLS
renegotiations -- this is similer to how the common name is also
locked.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5098 e7ae566f-a301-0410-adde-c780ea21d3b5
2009-10-24 01:08:30 +00:00
james
0f9c77b7d9 Added "setenv GENERIC_CONFIG" directive, for generic configs
that cannot directly be used as a config file.  The directive
will simply cause OpenVPN to exit with an error if a generic
config file is used.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5077 e7ae566f-a301-0410-adde-c780ea21d3b5
2009-10-16 16:31:01 +00:00