1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-09-13 07:13:00 +03:00
Commit Graph

1971 Commits

Author SHA1 Message Date
Ilya Shipitsin
2fdd9ec4dc
Merge pull request #1832 from chipitsine/master
src/Cedar/Server.c: fix race condition
2023-05-13 20:42:38 +02:00
Roel van de Wiel
36505e3896 Changed 'settng' to 'setting' and regenerated the RPC docs 2023-05-10 15:09:57 +02:00
Ilya Shipitsin
6ae786d542
Merge pull request #1833 from chipitsine/coverity_fix
several potential null pointer dereferences fix
2023-05-01 09:14:17 +02:00
Ilya Shipitsin
c59df82666 src/Mayaqua/Secure.c: fix potential null pointer dereference
found by coverity

   CID 343528 (#1 of 1): Dereference before null check (REVERSE_INULL)
   check_after_deref: Null-checking name suggests that it may be null,
   but it has already been dereferenced on all paths leading to the
   check.
   438        if (name == NULL || k == NULL || k->private_key == false)
   439        {
   440                sec->Error = SEC_ERROR_BAD_PARAMETER;
   441                return false;
   442        }
2023-05-01 06:18:39 +02:00
Ilya Shipitsin
db7d6c83d5 src/Mayaqua/Secure.c: fix potential null pointer dereference
found by coverity

   CID 343537 (#1 of 1): Dereference before null check (REVERSE_INULL)
   check_after_deref: Null-checking name suggests that it may be null
   but it has already been dereferenced on all paths leading to the
   check.
   664        if (name == NULL)
   665        {
   666                sec->Error = SEC_ERROR_BAD_PARAMETER;
   667                return false;
   668        }
2023-05-01 06:09:38 +02:00
Ilya Shipitsin
a89adaebc3 src/Mayaqua/Secure.c: fix potential null pointer dereference
found by coverity

 CID 343536 (#1 of 1): Dereference before null check (REVERSE_INULL)
 check_after_deref: Null-checking name suggests that it may be null, but
 it has already been dereferenced on all paths leading to the check.
 1339        if (name == NULL || data == NULL || size == 0)
 1340        {
 1341                sec->Error = SEC_ERROR_BAD_PARAMETER;
 1342                return false;
 1343        }
2023-05-01 06:07:19 +02:00
Ilya Shipitsin
c46871688b src/Cedar/Server.c: fix race condition
=================================================================
==1505093==ERROR: AddressSanitizer: heap-use-after-free on address 0x607000366b88 at pc 0x7f72afadc34a bp 0x7f72990fa390 sp 0x7f72990fa388
READ of size 4 at 0x607000366b88 thread T22
    #0 0x7f72afadc349 in GetCaps /home/ilia/SoftEtherVPN/src/Cedar/Server.c:1861
    #1 0x7f72afadc382 in GetCapsInt /home/ilia/SoftEtherVPN/src/Cedar/Server.c:1802
    #2 0x7f72afaf72a5 in GetServerCapsInt /home/ilia/SoftEtherVPN/src/Cedar/Server.c:1098
    #3 0x7f72afaf7318 in GetServerCapsBool /home/ilia/SoftEtherVPN/src/Cedar/Server.c:1104
    #4 0x7f72afaf771e in SiWriteHubCfg /home/ilia/SoftEtherVPN/src/Cedar/Server.c:4887
    #5 0x7f72afaf771e in SiWriteHubCfg /home/ilia/SoftEtherVPN/src/Cedar/Server.c:4824
    #6 0x7f72afaf7c0b in SiWriteHubs /home/ilia/SoftEtherVPN/src/Cedar/Server.c:5548
    #7 0x7f72afaf7c0b in SiWriteHubs /home/ilia/SoftEtherVPN/src/Cedar/Server.c:5515
    #8 0x7f72afaf81d6 in SiWriteConfigurationToCfg /home/ilia/SoftEtherVPN/src/Cedar/Server.c:3166
    #9 0x7f72afaf86bc in SiWriteConfigurationFile /home/ilia/SoftEtherVPN/src/Cedar/Server.c:6593
    #10 0x7f72afaf86bc in SiWriteConfigurationFile /home/ilia/SoftEtherVPN/src/Cedar/Server.c:6569
    #11 0x7f72afaf8914 in SiSaverThread /home/ilia/SoftEtherVPN/src/Cedar/Server.c:6561
    #12 0x7f72afaf8914 in SiSaverThread /home/ilia/SoftEtherVPN/src/Cedar/Server.c:6547
    #13 0x7f72af6e0cfa in ThreadPoolProc /home/ilia/SoftEtherVPN/src/Mayaqua/Kernel.c:872
    #14 0x7f72af6e0cfa in ThreadPoolProc /home/ilia/SoftEtherVPN/src/Mayaqua/Kernel.c:827
    #15 0x7f72af76eeb4 in UnixDefaultThreadProc /home/ilia/SoftEtherVPN/src/Mayaqua/Unix.c:1604
    #16 0x7f72af4ffc56 in start_thread (/lib64/libc.so.6+0x8cc56) (BuildId: 6107835fa7d4725691b2b7f6aaee7abe09f493b2)
    #17 0x7f72af585a6f in __clone3 (/lib64/libc.so.6+0x112a6f) (BuildId: 6107835fa7d4725691b2b7f6aaee7abe09f493b2)

0x607000366b88 is located 24 bytes inside of 72-byte region [0x607000366b70,0x607000366bb8)
freed by thread T0 here:
    #0 0x7f72afed7fc8 in __interceptor_free.part.0 (/lib64/libasan.so.8+0xd7fc8) (BuildId: 9501248886f79bf1482f3e153f794be742818172)
    #1 0x7f72af76ed6f in UnixMemoryFree /home/ilia/SoftEtherVPN/src/Mayaqua/Unix.c:2072

previously allocated by thread T22 here:
    #0 0x7f72afed92ff in malloc (/lib64/libasan.so.8+0xd92ff) (BuildId: 9501248886f79bf1482f3e153f794be742818172)
    #1 0x7f72af76f35d in UnixMemoryAlloc /home/ilia/SoftEtherVPN/src/Mayaqua/Unix.c:2053

Thread T22 created by T0 here:
    #0 0x7f72afe48966 in pthread_create (/lib64/libasan.so.8+0x48966) (BuildId: 9501248886f79bf1482f3e153f794be742818172)
    #1 0x7f72af76f713 in UnixInitThread /home/ilia/SoftEtherVPN/src/Mayaqua/Unix.c:1683

SUMMARY: AddressSanitizer: heap-use-after-free /home/ilia/SoftEtherVPN/src/Cedar/Server.c:1861 in GetCaps
Shadow bytes around the buggy address:
  0x607000366900: 00 00 00 fa fa fa fa fa 00 00 00 00 00 00 00 00
  0x607000366980: 00 fa fa fa fa fa 00 00 00 00 00 00 00 00 00 fa
  0x607000366a00: fa fa fa fa 00 00 00 00 00 00 00 00 00 fa fa fa
  0x607000366a80: fa fa 00 00 00 00 00 00 00 00 00 fa fa fa fa fa
  0x607000366b00: 00 00 00 00 00 00 00 00 00 fa fa fa fa fa fd fd
=>0x607000366b80: fd[fd]fd fd fd fd fd fa fa fa fa fa fd fd fd fd
  0x607000366c00: fd fd fd fd fd fa fa fa fa fa fd fd fd fd fd fd
  0x607000366c80: fd fd fd fa fa fa fa fa fd fd fd fd fd fd fd fd
  0x607000366d00: fd fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x607000366d80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x607000366e00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
2023-05-01 05:53:36 +02:00
Ilya Shipitsin
aadc068964
Merge pull request #1831 from chipitsine/master
src/Mayaqua/Unix.c: fix guarding
2023-04-29 23:47:35 +02:00
Ilya Shipitsin
46e73e944f src/Mayaqua/Unix.c: fix guarding
SoftEtherVPN/src/Mayaqua/Unix.c:51:25: warning: missing
terminating ' character
   51 | #include <sys/statvfs.h>'
2023-04-29 22:31:55 +02:00
Ilya Shipitsin
8fc27da780
Merge pull request #1829 from chipitsine/master
src/Mayaqua/Str.c: fix denial of service reported by Cisco Talos
2023-04-22 08:26:47 +02:00
Ilya Shipitsin
c983ebffc1
Merge pull request #1828 from chipitsine/cleanup_source_release_pipeline
Cleanup source release pipeline
2023-04-21 23:22:02 +02:00
Ilya Shipitsin
df6df007a3 src/Mayaqua/Str.c: fix denial of service reported by Cisco Talos
TALOS-2023-1741
CVE-2023-23581

SoftEther VPN vpnserver EnSafeHttpHeaderValueStr denial of service
vulnerability

A denial of service vulnerability exists in the vpnserver
EnSafeHttpHeaderValueStr functionality of SoftEther VPN 5.01.9674 and
5.02. A specially-crafted network packet can lead to denial of service.
2023-04-21 22:38:22 +02:00
Ilya Shipitsin
f7a2cc5a7d CI: modernize GH release creation
details:
https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
2023-04-21 22:27:47 +02:00
Ilya Shipitsin
544f03ec8b CI: drop AppVeyor source release creation in favour of GH Actions 2023-04-21 22:26:30 +02:00
Ilya Shipitsin
82ce34fccb
Merge pull request #1824 from chipitsine/master
src/Cedar/Proto_OpenVPN.c: fix denial of service found by Cisco Talos
2023-04-17 00:22:03 +02:00
Ilya Shipitsin
6ff0ce7076
Merge pull request #1823 from chipitsine/bump_cirrus_ci
CI: cirrus-ci: switch to freebsd-13.2
2023-04-17 00:21:39 +02:00
Ilya Shipitsin
d2e673a47d src/Cedar/Proto_OpenVPN.c: fix denial of service found by Cisco Talos
specially crafted network packet lead to buffer overrun and process
crash. working exploit was provided by Cisco Talos team.

An integer underflow vulnerability exists in the vpnserver
OvsProcessData functionality of SoftEther VPN 5.01.9674 and 5.02. A
specially-crafted network packet can lead to denial of service. An
attacker can send a malicious packet to trigger this vulnerability.

The versions below were either tested or verified to be vulnerable by
Talos or confirmed to be vulnerable by the vendor.

SoftEther VPN 5.01.9674
SoftEther VPN 5.02
While 5.01.9674 is a development version, it is distributed at the time
of writing by Ubuntu and other Debian-based distributions.
2023-04-16 23:06:30 +02:00
Ilya Shipitsin
b3df7a0b90 CI: cirrus-ci: switch to freebsd-13.2
openssl-devel has been renamed to openssl3{0,1}.
2023-04-16 22:58:03 +02:00
Ilya Shipitsin
22c602f630
Merge pull request #1801 from chipitsine/master
Windows: link MSVC runtime static
2023-04-03 09:43:13 +02:00
Yihong Wu
b4e26dec05
Merge pull request #1815 from domosekai/b64
Mayaqua/Memory: Fix memory corruption in base64
2023-04-01 13:16:39 +09:00
Yihong Wu
df7ea3c54a Mayaqua/Memory: Fix memory corruption in base64 2023-03-31 09:14:39 +00:00
Ilya Shipitsin
423631100f
Merge pull request #1802 from SoftEtherVPN/dependabot/npm_and_yarn/src/bin/hamcore/wwwroot/admin/default/webpack-5.76.0
Bump webpack from 5.75.0 to 5.76.0 in /src/bin/hamcore/wwwroot/admin/default
2023-03-15 13:32:01 +01:00
dependabot[bot]
fb83ac08f2
Bump webpack in /src/bin/hamcore/wwwroot/admin/default
Bumps [webpack](https://github.com/webpack/webpack) from 5.75.0 to 5.76.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.75.0...v5.76.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-15 09:35:00 +00:00
Ilya Shipitsin
e6123d36a0
Merge pull request #1782 from metalefty/adjust-version-string
Cedar: Trim contiguous whitespaces in version string
2023-03-12 08:32:55 +01:00
Ilya Shipitsin
0ff9d1a455 CI: Windows: use static link for MSVC runtime 2023-03-11 23:08:59 +01:00
Ilya Shipitsin
96ab969152 build: windows: link MSVC runtime statically 2023-03-11 21:52:11 +01:00
Ilya Shipitsin
1f3a730d0a .gitignore: do not count Visual Studio user settings 2023-03-11 21:48:31 +01:00
Ilya Shipitsin
21963c6c68
Merge pull request #1796 from SoftEtherVPN/dependabot/npm_and_yarn/src/bin/hamcore/wwwroot/admin/default/minimist-and-mkdirp-1.2.8
Bump minimist and mkdirp in /src/bin/hamcore/wwwroot/admin/default
2023-03-03 09:44:10 +06:00
dependabot[bot]
91053622ab
Bump minimist and mkdirp in /src/bin/hamcore/wwwroot/admin/default
Bumps [minimist](https://github.com/minimistjs/minimist) and [mkdirp](https://github.com/isaacs/node-mkdirp). These dependencies needed to be updated together.

Updates `minimist` from 0.0.8 to 1.2.8
- [Release notes](https://github.com/minimistjs/minimist/releases)
- [Changelog](https://github.com/minimistjs/minimist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/minimistjs/minimist/compare/v0.0.8...v1.2.8)

Updates `mkdirp` from 0.5.1 to 0.5.6
- [Release notes](https://github.com/isaacs/node-mkdirp/releases)
- [Changelog](https://github.com/isaacs/node-mkdirp/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-mkdirp/compare/0.5.1...v0.5.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
- dependency-name: mkdirp
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-03 01:26:17 +00:00
Ilya Shipitsin
1519e23b3e
Merge pull request #1795 from metalefty/se-vs-de
README: SEvsDE: document AES-NI hardware acceleration support
2023-03-02 16:28:35 +06:00
Koichiro IWAO
f7d33568f3
README: SEvsDE: document AES-NI hardware acceleration support
Stable Edition requires intel_aes_lib to enable AES-NI [1]. Developer
Edition depends on OpeSSL to use AES-NI. It is enabled by default as
long as processor supports it.

[1] https://github.com/SoftEtherVPN/SoftEtherVPN_Stable/blob/bf23fe0/src/Mayaqua/Encrypt.c#L145-L147
2023-03-02 18:44:02 +09:00
Koichiro IWAO
1fe26ccb6c
Cedar: Trim contiguous whitespaces in version string
Before change, contiguous whitespaces appeared in version string.
This room is for beta string (such as Alpha, Beta) and beta number but
it looks a bit odd if the build is not alpha/beta/RC.

> Version 5.02 Build 5180 Alpha 3 (Japanese)
> Version 5.02 Build 5180 Beta 3 (Japanese)
> Version 5.02 Build 5180 Release Candidate 3 (Japanese)
> Version 5.02 Build 5180   (Japanese)
>                        ^^^

Now version string looks neat like this:

> Version 5.02 Build 5180 (Japanese)
> Version 5.02 Build 5180 Release Candidate 3 (Japanese)
2023-03-01 16:14:04 +09:00
Ilya Shipitsin
8c64dc0cd7
Merge pull request #1781 from metalefty/vm-detection/freebsd-on-vm
Mayaqua/Unix: Make VM detection work on FreeBSD
2023-02-28 20:32:26 +06:00
Koichiro IWAO
bedf1cd7e9
Mayaqua/Unix: Make VM detection work on FreeBSD
This is just a cosmetic problem in the result of "Caps" command which
gets the list of server functions/capability.  There's no behavioural
change in SoftEtherVPN whether running on VM so far.
2023-02-28 20:08:04 +09:00
Ilya Shipitsin
d7c487619a
Merge pull request #1780 from chipitsine/master
CI: bump Ubuntu to newer version, install missing DCO dependencies
2023-02-28 08:31:52 +06:00
Ilya Shipitsin
2b7b728077 CI: bump Ubuntu to newer version, install missing DCO dependencies 2023-02-27 20:51:23 +06:00
Yihong Wu
cd2838795b Radius: Make sure MS-CHAP response matches the original username 2023-02-27 08:37:23 +00:00
Yihong Wu
4ff9c6393a Support all EAP methods for PPP sessions with RADIUS 2023-02-27 08:37:23 +00:00
Yihong Wu
e81ecbb0ec Support EAP auth with RADIUS server for SEVPN 2023-02-24 13:05:34 +00:00
Yihong Wu
e20fa9ec2e
Merge pull request #1773 from domosekai/radius
Cedar/Proto_PPP: Fix radius authentication
2023-02-24 11:36:42 +08:00
Yihong Wu
1741dfdccc Cedar/Proto_PPP: Fix radius authentication 2023-02-23 13:03:10 +00:00
Yihong Wu
d045d1eeb7
Merge pull request #1771 from ChurchillSD/master
Fix Incorrect password hash on documentation
2023-02-21 10:16:34 +08:00
Yihong Wu
cc61b5b3c3
Merge pull request #1772 from domosekai/udp
Mayaqua/Network: Fix empty packet being treated as error
2023-02-21 10:14:36 +08:00
Yihong Wu
eea1de3d25 Mayaqua/Network: Fix empty packet being treated as error 2023-02-19 05:41:55 +00:00
Hector
7e19bbc421
Fix Incorrect password hash on documentation 2023-02-17 11:30:55 +00:00
Yihong Wu
d49b9f108b
Merge pull request #1762 from Evengard/ppp-coverity-fixes
Fixing up coverity report flags from #1760 and #1761
2023-02-05 00:15:51 +09:00
Evengard
c67d9ee201 Fixing up coverity report flags from #1760 and #1761 2023-02-04 17:47:20 +03:00
Yihong Wu
1062692d08
Merge pull request #1759 from domosekai/fixtls
Fix thread safety after #1751
2023-02-02 17:40:23 +09:00
Yihong Wu
025ebec4cc Fix thread safety after #1751 2023-02-02 06:53:30 +00:00
Ilya Shipitsin
11828be9e6
Merge pull request #1751 from Evengard/eap-tls-fixups
TLS 1.3 for EAP-TLS, user search by certificate CN
2023-02-01 09:47:38 +06:00