Commit Graph
100 Commits
Author SHA1 Message Date
Davide Beatrici 876ca4ef3e Merge PR #1039: Port latest improvements from stable repository 2019-11-23 06:41:57 +01:00
Davide Beatrici 6b08a451da Mayaqua: implement R-UDP version 2, powered by ChaCha20-Poly1305 2019-11-23 04:38:20 +01:00
Davide Beatrici 2ea5c2a7b0 Cedar: implement UDP acceleration version 2, powered by ChaCha20-Poly1305 2019-11-23 04:23:56 +01:00
Davide Beatrici a676a0a6fd Merge PR #1035: Cedar: add "DisableIPsecAggressiveMode" option 2019-11-18 07:31:27 +01:00
Davide Beatrici 4acd7ab98e Merge PR #1022: Move generic proxy stuff from Cedar to Mayaqua 2019-11-01 09:35:18 +01:00
Davide Beatrici 7829fe2c59 Merge PR #1024: Make install dir for unit files configurable 2019-10-31 09:37:15 +01:00
Davide Beatrici 63caa4b07f Protocol.c: adapt ClientConnectGetSocket() for new proxy functions
The function has been greatly improved, here are some of the changes:

- The required SESSION (c->Session) parameter is checked correctly: the function returns immediately in case it's NULL. Previously, the function didn't return in case the parameter was NULL; multiple checks were in place, but not in all instances where the parameter was dereferenced.
- The resolved IP address is cached with all proxy types.
- The "RestoreServerNameAndPort" variable is documented.
- The Debug() messages have been improved.
2019-10-30 01:39:11 +01:00
Davide Beatrici 3c21d982fc Wpc.c: adapt WpcSockConnectEx() for new proxy functions 2019-10-30 01:39:11 +01:00
Davide Beatrici 59dc26aa21 Protocol: add ProxyCodeToCedar()
This new function translates a proxy error code to a Cedar error code.
2019-10-30 01:39:11 +01:00
Davide Beatrici b8f58a2f94 Move generic proxy stuff from Cedar to Mayaqua
This commit moves the generic (not related to our protocol) proxy stuff from Cedar to Mayaqua, in dedicated files.

The functions are refactored so that they all have the same arguments and follow the same logic.

Dedicated error codes are added, in order to indicate clearly why the function(s) failed.
2019-10-30 01:39:04 +01:00
Davide Beatrici 1e835e7ec2 Merge PR #1020: Proto_OpenVPN.c: improve OvsProcessData(), fix out-of-bounds access found by Coverity 2019-10-27 09:37:11 +01:00
Davide Beatrici 5d73cd878f Proto_OpenVPN.c: improve OvsProcessData(), fix out-of-bounds access found by Coverity
Coverity Scan detected an out-of-bounds access issue: OvsProcessData() checked whether the payload size was bigger than the size of the buffer, instead of checking whether the entire packet size (payload size + 2 bytes) was, resulting in an out-of-bounds access in case the payload size is bigger than 1998.

This commit also improves the variable names, the comments and adds two Debug() lines.
2019-10-27 09:01:56 +01:00
Davide Beatrici 7349c4b16a Merge PR #1018: Proto_OpenVPN.c: fix segmentation fault in OvsProceccRecvPacket() 2019-10-26 00:53:27 +02:00
Davide Beatrici 16bde47763 Proto_OpenVPN.c: fix segmentation fault in OvsProceccRecvPacket()
OvsDecrypt() returns 0 when it fails, resulting in "size" rolling over with an end result of 4294967292.

This commit fixes the issue by checking whether "size" is greater than sizeof(UINT) before performing the subtraction.
2019-10-26 00:36:07 +02:00
Davide Beatrici 79a60bc5f0 Merge PR #1014: Addressing the OpenVPN UDP reflection amplification attack 2019-10-22 09:42:08 +02:00
Davide Beatrici 46d8da6744 Merge PR #1012: Mayaqua.h: include <stdarg.h> for "va_list" on Illumos 2019-10-21 22:08:09 +02:00
Davide Beatrici 51330fdb43 Mayaqua.h: include <stdarg.h> for "va_list" on Illumos 2019-10-21 21:44:38 +02:00
Davide Beatrici 5b15b12ea9 Merge PR #1011: Protocol.c: fix bug in ClientConnectGetSocket() causing custom HTTP header not to work 2019-10-21 21:38:34 +02:00
Davide Beatrici 12cc242529 Protocol.c: fix bug in ClientConnectGetSocket() causing custom HTTP header not to work
The bug was caused by a typo in the StrCpy() call: the source buffer was the same as the destination one, meaning that the function didn't do anything.
2019-10-21 20:26:56 +02:00
Davide Beatrici 4afdad09a1 Merge PR #1009: Move HTTP related functions to dedicated file(s) in Mayaqua 2019-10-20 13:28:53 +02:00
Davide Beatrici 2f90e9ecb8 Mayaqua: move HTTP functions from "Network" to "HTTP" 2019-10-20 04:15:12 +02:00
Davide Beatrici c3d6ffc533 Move GetMimeTypeFromFileName() and related structure to Mayaqua
The structure (containing all mimetypes) occupies almost 700 lines, which are a lot.

This is just the beginning of the refactor plan.
2019-10-20 04:15:12 +02:00
Davide Beatrici 04ecbf843a Mayaqua.h: include <stdio.h> for "FILE" 2019-10-20 04:15:12 +02:00
Davide Beatrici 6b41b19327 Mayaqua.h: include <stddef.h>, for "wchar_t" 2019-10-20 04:15:12 +02:00
Davide Beatrici 93dcd25d63 Merge PR #1010: Bump mixin-deep from 1.3.1 to 1.3.2 in /src/bin/hamcore/wwwroot/admin/default 2019-10-20 01:06:55 +02:00
Davide Beatrici 2aeec323f9 Merge PR #1008: Adding RADIUS and L3 MAC address fixing function, with small bug-fixes 2019-10-19 19:37:21 +02:00
Davide Beatrici c8a0a5648b Merge PR #970: Fix buffer overflow during NETBIOS name resolution 2019-09-30 06:59:04 +02:00
Davide Beatrici 9e46402e6b Merge PR #960: ci: display error if vpntest failed 2019-08-29 09:05:47 +02:00
Davide Beatrici d10f83417f Merge PR #962: Fix several compile warnings on MS VC++ 2008. 2019-08-04 04:03:14 +02:00
Davide Beatrici 82b84a9436 Merge PR #961: Enable crash minidump for Win32 vpntest 2019-08-04 03:51:00 +02:00
Davide Beatrici 7dff0dce17 Merge PR #957: Add interface for easy protocol implementation 2019-07-29 03:33:48 +02:00
Davide Beatrici 9f19efb7af OpenVPN: use new protocol interface 2019-07-26 08:37:00 +02:00
Davide Beatrici 7d58e6bf60 Add interface for easy protocol implementation
This commit adds a protocol interface to the server, its purpose is to manage TCP connections and the various third-party protocols.

More specifically, ProtoHandleConnection() takes care of exchanging the packets between the local and remote endpoint; the protocol implementation only has to parse them and act accordingly.

The interface knows which protocol is the connection for by calling IsPacketForMe(), a function implemented for each protocol.
2019-07-26 08:36:54 +02:00
Davide Beatrici 24f426162c Merge PR #947: travis-ci: add sonar-scan, update openssl, libressl 2019-07-17 09:37:09 +02:00
Davide Beatrici 9b20444bb2 Merge PR #945: Virtual: fix race condition in DHCP server which resulted in multiple clients receiving the same IP 2019-07-15 09:23:09 +02:00
Davide Beatrici d6cf1b85a9 Virtual: fix race condition in DHCP server which resulted in multiple clients receiving the same IP
A race condition in the DHCP server caused it to offer the same IP address to multiple clients when they connected at the same time, because an offered IP address was considered free until the final step (DHCP_ACK).

This commit introduces a list to keep track of the pending leases created during DHCP_OFFER, so that an IP address is guaranteed to be offered to a single client.
2019-07-13 23:29:16 +02:00
Davide Beatrici 831c907512 Merge PR #943: Mayaqua: Fix compilation without deprecated OpenSSL APIs 2019-07-11 22:03:23 +02:00
Davide Beatrici fb5083be29 Merge PR #941: Mayaqua: Replace GNU specific sys/poll.h header with POSIX poll.h 2019-07-11 02:27:02 +02:00
Davide Beatrici dcc99fdbb2 Merge PR #940: release 5.01.9671 2019-07-10 19:49:13 +02:00
Davide Beatrici 50e39826e4 Merge PR #934: src/Cedar/Admin.c: remove redundant check 2019-07-06 07:59:03 +02:00
Davide Beatrici 919f6c825f Merge PR #929: Added ProbeForWrite() buffer writable check routine for Irp->UserBuffer in the NDIX 5.x See driver. 2019-06-29 17:02:57 +02:00
Davide Beatrici 9fbfa61b34 Merge PR #928: OpenVPN X.509 certificate authentication will be used only when no username / password is specified 2019-06-29 16:42:06 +02:00
Davide Beatrici b43a1e76da Merge PR #900: release 5.01.9670 2019-04-08 20:49:22 +02:00
Davide Beatrici afa93c8b84 Merge PR #896: introduce cirrus-ci builds 2019-04-02 19:48:07 +02:00
Davide Beatrici 89dfa319f3 Merge PR #893: travis-ci: add linux-ppc64le to build matrix 2019-03-15 23:34:19 +01:00
Davide Beatrici ec72d90140 Merge PR #892: azure pipelines improvements 2019-03-13 20:11:24 +01:00
Davide Beatrici 2f12e54fbc Merge PR #889: some build cleanup 2019-03-11 19:15:26 +01:00
Davide Beatrici ec7a0512f6 Merge PR #888: Fixed the RsaVerifyEx function buffer overflow problem 2019-03-06 17:43:37 +01:00
Davide Beatrici beef8d6892 Merge PR #885: Rename "azure-pipelines.yml" to ".azure-pipelines.yml" 2019-02-27 22:40:14 +01:00
Davide Beatrici bb56998a4e Rename "azure-pipelines.yml" to ".azure-pipelines.yml" 2019-02-27 21:51:53 +01:00
Davide Beatrici ba94d8a6fa Merge PR #884: Fix memory leak in OpenSSL deinitialization function 2019-02-27 21:47:52 +01:00
Davide Beatrici e750ace40a Merge PR #883: Fix compilation without OpenSSL ENGINE 2019-02-25 23:33:54 +01:00
Davide Beatrici d7941be664 Merge PR #875: Fixed wrong function name in Debug message 2019-02-16 03:04:07 +01:00
Davide Beatrici c1243c5198 Merge PR #873: ver.rc: fix misspelling 2019-02-14 08:51:19 +01:00
Davide Beatrici 270d9f1e0b Merge PR #872: Fix to show correct version in Server Manager GUI 2019-02-14 08:38:09 +01:00
Davide Beatrici 8657955c92 Merge PR #867: Improve translations for inf file. 2019-01-24 01:42:25 +01:00
Davide Beatrici a97b87da68 Cedar/Admin.c: fix segmentation fault caused by non-initialized string in StGetServerCipherList()
StrCat() appends a string to an already existing string. In order to know where the existing string ends, it uses StrLen() which in turn uses strlen(), a function considered unsafe because it doesn't stop until it finds the null character.

Since the string was allocated but not initialized, StrCat() was either:

- Working correctly.
- Copying only a part of the string.
- Making the program crash via strlen().

The fix consists in using StrCpy(), which starts writing at the beginning of the string.
2019-01-21 04:15:55 +01:00
Davide Beatrici 09ee19e72b Mayaqua/Network.c: fix double free crash in GetCipherList()
SSL_free() also frees the associated context.

https://github.com/openssl/openssl/blob/d6c3c1896cf3c0d69bc27da923d63f8130b13ca0/ssl/ssl_lib.c#L1209

From https://www.openssl.org/docs/man1.1.1/man3/SSL_free.html:

"SSL_free() also calls the free()ing procedures for indirectly affected items, if applicable: the buffering BIO, the read and write BIOs, cipher lists specially created for this ssl, the SSL_SESSION. Do not explicitly free these indirectly freed up items before or after calling SSL_free(), as trying to free things twice may lead to program failure."
2019-01-21 04:14:47 +01:00
Davide Beatrici 3b85a116ff Merge PR #857: remove unused functions 2019-01-06 20:31:36 +01:00
Davide Beatrici b882265f84 Merge PR #856: remove unused functions 2019-01-06 17:26:23 +01:00
Davide Beatrici 359918c1cb Merge PR #855: AppVeyor: run openvpn integration tests 2019-01-06 13:24:13 +01:00
Davide Beatrici 4e6f58584e Merge PR #854: run openvpn tests within Azure Pipelines 2019-01-05 22:33:23 +01:00
Davide Beatrici 8ec43e7618 Merge PR #852: Cedar: retrieve the list of available encryption algorithms from the server 2019-01-01 22:10:33 +01:00
Davide Beatrici d62421adcb Cedar: retrieve the list of available encryption algorithms from the server 2019-01-01 20:31:13 +01:00
Davide Beatrici 422076d6c9 Merge PR #851: Mayaqua: fix segmentation fault, add new FreeHttpHeaderSafe() function 2018-12-30 15:00:21 +01:00
Davide Beatrici 2a572aab21 Mayaqua: fix segmentation fault, add new FreeHttpHeaderSafe() function 2018-12-30 14:46:26 +01:00
Davide Beatrici 619a533b8f Merge PR #843: Mayaqua: query OpenSSL for the list of available ciphers instead of relying on a static list 2018-12-28 20:24:13 +01:00
Davide Beatrici 2aaeed67c4 Merge PR #848: Fixed a typo in Chinese translation 2018-12-24 22:55:47 +01:00
Davide Beatrici eee494f046 Merge PR #847: Mayaqua: add "PTR_TO_PTR" macro intended to be used with FreeSafe() 2018-12-23 11:36:40 +01:00
Davide Beatrici fca10c0975 Merge PR #845: Cedar/IPC.c: fix memory leak occurring when both the username and common name are not present (OpenVPN) 2018-12-23 11:35:47 +01:00
Davide Beatrici e51c319648 Mayaqua: add "PTR_TO_PTR" macro intended to be used with FreeSafe() 2018-12-22 07:38:38 +01:00
Davide Beatrici ef77e95f87 Cedar/IPC.c: fix memory leak occurring when both the username and common name are not present (OpenVPN) 2018-12-21 21:24:22 +01:00
Davide Beatrici 7f9d47b3aa Mayaqua: query OpenSSL for the list of available ciphers instead of relying on a static list 2018-12-21 09:54:51 +01:00
Davide Beatrici 545c987a8a Merge PR #842: hamcore: fix port number shown in the server management info string of vpncmd 2018-12-21 09:06:02 +01:00
Davide Beatrici ac5e68b3ed hamcore: fix port number shown in the server management info string of vpncmd 2018-12-21 07:27:57 +01:00
Davide Beatrici 3c3aa900b6 Merge PR #841: Mayaqua: fix segmentation fault, add new FreeSafe() function 2018-12-20 03:19:43 +01:00
Davide Beatrici bd01cbff9a Mayaqua: add new FreeSafe() function which calls Free() and set the pointer's value to NULL 2018-12-20 02:52:22 +01:00
Davide Beatrici ada06e218e Mayaqua: revamp RecvHttpHeader() so that cleanup functions are not called twice 2018-12-19 20:00:18 +01:00
Davide Beatrici 30f37beed2 Merge PR #838: cleanup: remove ChangeLog, it is not actively maintained 2018-12-18 00:21:04 +01:00
Davide Beatrici fcba22988f Merge PR #835: Cedar: Bind the special listeners to the specified IP address 2018-12-16 17:02:47 +01:00
Davide Beatrici 6c44cecc64 Cedar: Bind the special listeners to the specified IP address 2018-12-15 21:33:37 +01:00
Davide Beatrici aa3a797edb Merge PR #833: Add new icons based on the one made by Icons8 2018-12-14 03:02:23 +01:00
Davide Beatrici 884a402c0c README.md: Mention Icons8's support 2018-12-07 08:50:34 +00:00
Davide Beatrici a812910f85 src: Update VPN Client Manager and VPN Server Manager icons 2018-12-07 08:35:02 +00:00
Davide Beatrici 79012b4b21 resources: Add icons based on the one made by Icons8
https://icons8.com/icon/39916/softether-vpn
2018-12-07 08:34:33 +00:00
Davide Beatrici 740a4aafe1 Merge PR #831: SHA-0 Implementation replacement from GPLv3 to Apache License 2018-12-02 02:53:59 +01:00
Davide Beatrici e87a8693bb Merge PR #828: Added the "OpenVPNPushDummyIPv4AddressOnL2Mode" option for the OpenVPN L2 mode. 2018-12-02 00:35:44 +01:00
Davide Beatrici 32172ed82d Merge PR #830: CI: avoid not needed builds, make AppVeyor upload src with submodules 2018-12-01 20:07:01 +01:00
Davide Beatrici aefbd2e903 Add custom HTTP header feature for HTTP proxy
A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS.
2018-11-29 20:32:21 +01:00
Davide Beatrici 0c7ba23621 Merge PR #824: AppVeyor: shorten artifacts path, move github token to variables 2018-11-29 20:07:55 +01:00
Davide Beatrici bf0d5c551e Merge PR #823: Cedar: allow @ in username 2018-11-28 18:32:17 +01:00
Davide Beatrici a1722ac2e0 Cedar: allow @ in username 2018-11-28 15:51:04 +01:00
Davide Beatrici 28e9b46634 Merge PR #820: travis-ci: do not do anything on tag, source is packed automatically 2018-11-27 20:51:56 +01:00
Davide Beatrici dbfc990701 Merge PR #819: CMake: build targets with versioning info on Windows 2018-11-27 17:03:36 +01:00
Davide Beatrici 8d37f3fa0f BuildUtil: use new variables 2018-11-27 05:26:28 +01:00
Davide Beatrici 6903f9b89f CMake: build targets with versioning info on Windows 2018-11-27 05:26:21 +01:00
Davide Beatrici 0642427080 BuildFiles: edit "ver.rc" so that it uses CMake's variables syntax 2018-11-27 05:00:30 +01:00
Davide Beatrici 04188f8606 CMake: change project name to "SoftEther VPN", create and use "TOP_DIRECTORY" variable 2018-11-27 05:00:30 +01:00
Davide Beatrici e143873337 Merge PR #816: Cedar: add new "UsernameHubSeparator" configuration option for the server, to specify a different character from '@' 2018-11-26 21:59:52 +01:00
Davide Beatrici 8a58af86b1 Cedar: add new "UsernameHubSeparator" configuration option for the server, to specify a different character from '@' 2018-11-25 20:50:14 +01:00