1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-10-06 10:30:40 +03:00
Commit Graph

31 Commits

Author SHA1 Message Date
Daiyuu Nobori
c49e462ed1 Fix Vulnerability: CVE-2023-22325 TALOS-2023-1736
SoftEther VPN DCRegister DDNS_RPC_MAX_RECV_SIZE denial of service vulnerability
https://www.softether.org/9-about/News/904-SEVPN202301
https://jvn.jp/en/jp/JVN64316789/
2023-09-28 18:26:17 +09:00
Yihong Wu
df7ea3c54a Mayaqua/Memory: Fix memory corruption in base64 2023-03-31 09:14:39 +00:00
Daiyuu Nobori
56aedd6817 Memory: Add LittleEndian16(), LittleEndian32() and LittleEndian64() 2022-02-22 19:38:03 +01:00
Davide Beatrici
233e28f38c Refactor Base64 functions, encode/decode using OpenSSL's EVP interface
Our own implementation works fine, however we should use OpenSSL's one since we already link to the library.

Base64Decode() and Base64Encode() return the required buffer size when "dst" is NULL.

This allows to efficiently allocate a buffer, without wasting memory or risking an overflow.

Base64FromBin() and Base64ToBin() perform all steps, returning a heap-allocated buffer with the data in it.
2021-07-02 09:24:41 +02:00
Davide Beatrici
a6ba9b8788 Include headers properly 2021-04-05 04:48:25 +02:00
Davide Beatrici
337a04b758 Remove "BOOL", "TRUE" and "FALSE", use lowercase everywhere for consistency 2020-08-15 09:18:27 +02:00
Daiyuu Nobori
98b08c2ad1 Implementation of the JSON-RPC API and the Web Admin interface. (dnobori's internal note: 7579 - 7682) 2019-05-28 12:51:51 +09:00
Daiyuu Nobori
63c01ba736
Merge pull request #832 from dnobori/181202_switch_to_apache_license
Switching license from GPLv2 to Apache License 2.0.
2019-01-21 09:36:19 +09:00
Daiyuu Nobori
881f34ac56 Compacting headers, updating trivial texts to fit to the license change from GPLv2 to Apache License 2.0. 2019-01-14 12:25:53 +09: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
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
c48de5924a Mayaqua: ability to toggle memory tracking at runtime, various logic improvements 2018-11-18 04:18:51 +01:00
Davide Beatrici
e496f33455 Memory.c: fix pointer cast in TrackChangeObjSize() call
This commit fixes the "TrackDeleteObj: 0x12345678 is not Object!!" (where 0x12345678 is the actual address) errors with memcheck enabled.

It also fixes the following related warnings:

warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  TrackChangeObjSize((DWORD)addr, size, (DWORD)new_addr);
                     ^
warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  TrackChangeObjSize((DWORD)addr, size, (DWORD)new_addr);
                                        ^
2018-10-14 07:51:53 +02:00
Davide Beatrici
9970d6f657 Mayaqua/Memory: move and adapt entry list functions from Cedar/Proto_OpenVPN 2018-10-06 22:41:35 +02:00
Davide Beatrici
3f5f716357 Revamp digest functions
- Hash() has been removed because it was ambiguous, Md5() and Sha0() are proper replacements.
- HMacMd5() and HMacSha1() now share a common implementation handled by the new Internal_HMac() function.
- NewMd() and MdProcess() now support plain hashing (without the key).
- NewMd(), SetMdKey() and MdProcess() now check the OpenSSL functions' return value and in case of failure a debug message is printed along with the error string, if available.
- SetMdKey()'s return value has been changed from void to bool, so that it's possible to know whether the function succeeded or not.
- MdProcess()' return value has been changed from void to UINT (unsigned int) and the function now returns the number of bytes written by HMAC_Final() or EVP_DigestFinal_ex().
2018-09-22 06:36:09 +02:00
Davide Beatrici
190ad01eb7 Memory: restore CloneList() function which was removed in #608 2018-08-05 20:08:37 +02:00
Ilya Shipitsin
f778405164 src/Mayaqua/Memory: remove unused functions
[src/Mayaqua/Memory.c:2605]: (style) The function 'ClearFifo' is never used.
[src/Mayaqua/Memory.c:1380]: (style) The function 'CloneList' is never used.
[src/Mayaqua/Memory.c:4267]: (style) The function 'CloneTail' is never used.
[src/Mayaqua/Memory.c:1972]: (style) The function 'DelAllInt' is never used.
[src/Mayaqua/Memory.c:2068]: (style) The function 'DelInt64' is never used.
[src/Mayaqua/Memory.c:1789]: (style) The function 'DeleteKey' is never used.
[src/Mayaqua/Memory.c:2934]: (style) The function 'DumpData' is never used.
[src/Mayaqua/Memory.c:835]: (style) The function 'FillBytes' is never used.
[src/Mayaqua/Memory.c:2759]: (style) The function 'GetFifoCurrentReallocMemSize' is never used.
[src/Mayaqua/Memory.c:1475]: (style) The function 'InsertDistinct' is never used.
[src/Mayaqua/Memory.c:2274]: (style) The function 'InsertInt64Distinct' is never used.
[src/Mayaqua/Memory.c:1612]: (style) The function 'IsInListUniStr' is never used.
[src/Mayaqua/Memory.c:2647]: (style) The function 'LockFifo' is never used.
[src/Mayaqua/Memory.c:1120]: (style) The function 'PeekQueue' is never used.
[src/Mayaqua/Memory.c:2158]: (style) The function 'RandomizeList' is never used.
[src/Mayaqua/Memory.c:1364]: (style) The function 'SetCmp' is never used.
[src/Mayaqua/Memory.c:1570]: (style) The function 'SetSortFlag' is never used.
[src/Mayaqua/Memory.c:1596]: (style) The function 'SortEx' is never used.
[src/Mayaqua/Memory.c:3718]: (style) The function 'Swap' is never used.
[src/Mayaqua/Memory.c:2659]: (style) The function 'UnlockFifo' is never used.
[src/Mayaqua/Memory.c:2532]: (style) The function 'WriteFifoFront' is never used.
[src/Mayaqua/Memory.c:1981]: (style) The function 'InsertInt64' is never used.
[src/Mayaqua/Memory.c:2317]: (style) The function 'PadFifoFront' is never used.
[src/Mayaqua/Memory.c:2155]: (style) The function 'PeekFifo' is never used.
2018-08-05 15:10:29 +05:00
Davide Beatrici
66b2d7234d Mayaqua: use included zlib headers only on Windows
zlib doesn't have a dedicated directory on Unix systems, because it has a single header, meaning that the header from the repository was being used instead.

This commit moves the header to the Windows includes directory, so that we can use the proper include path on all systems.
2018-07-31 07:56:52 +02:00
Josh Soref
ac865f04fc Correct Spelling (#458)
* spelling: accepts

* spelling: account

* spelling: accept

* spelling: accumulate

* spelling: adapter

* spelling: address

* spelling: additional

* spelling: aggressive

* spelling: adhered

* spelling: allowed

* spelling: ambiguous

* spelling: amount

* spelling: anonymous

* spelling: acquisition

* spelling: assemble

* spelling: associated

* spelling: assigns

* spelling: attach

* spelling: attempt

* spelling: attribute

* spelling: authenticate

* spelling: authentication

* spelling: available

* spelling: bridging

* spelling: cascade

* spelling: cancel

* spelling: check

* spelling: challenge

* spelling: changing

* spelling: characters

* spelling: cloud

* spelling: compare

* spelling: communication

* spelling: compatible

* spelling: compatibility

* spelling: completion

* spelling: complete

* spelling: computers

* spelling: configure

* spelling: configuration

* spelling: conformant

* spelling: connection

* spelling: contains

* spelling: continuously

* spelling: continue

* spelling: convert

* spelling: counters

* spelling: create

* spelling: created

* spelling: cumulate

* spelling: currently

* spelling: debugging

* spelling: decryption

* spelling: description

* spelling: default

* spelling: driver

* spelling: delete

* spelling: destination

* spelling: disabled

* spelling: different

* spelling: dynamically

* spelling: directory

* spelling: disappeared

* spelling: disable

* spelling: doesn't

* spelling: download

* spelling: dropped

* spelling: enable

* spelling: established

* spelling: ether

* spelling: except

* spelling: expired

* spelling: field

* spelling: following

* spelling: forever

* spelling: firewall

* spelling: first

* spelling: fragment

* spelling: function

* spelling: gateway

* spelling: identifier

* spelling: identify

* spelling: incoming

* spelling: information

* spelling: initialize

* spelling: injection

* spelling: inner

* spelling: instead

* spelling: installation

* spelling: inserted

* spelling: integer

* spelling: interrupt

* spelling: intuitive

* spelling: interval

* spelling: january

* spelling: keybytes

* spelling: know

* spelling: language

* spelling: length

* spelling: library

* spelling: listener

* spelling: maintain

* spelling: modified

* spelling: necessary

* spelling: number

* spelling: obsoleted

* spelling: occurred

* spelling: occurring

* spelling: occur

* spelling: original

* spelling: omittable

* spelling: omit

* spelling: opening

* spelling: operation

* spelling: packet

* spelling: parameters

* spelling: pointed

* spelling: popupmenuopen

* spelling: privilege

* spelling: product

* spelling: protection

* spelling: promiscuous

* spelling: prompt

* spelling: query

* spelling: random

* spelling: reconnection

* spelling: revocation

* spelling: received

* spelling: red hat

* spelling: registry

* spelling: release

* spelling: retrieve
2018-05-16 23:47:10 +02:00
Daiyuu Nobori
7de986dcca 7 missing memory boundaries checks and similar memory problems. There are no risk of arbitrary code execution or intrusion on these bugs in my analysis. However, these problems may lead to crash the running server process. So these bugs must be fixed.
Buffer overread in ParseL2TPPacket()
Memory corruption in IcmpParseResult
Missing bounds check in ParseUDP() can lead to invalid memory access
Out-of-bounds read in IPsec_PPP.c (unterminated string buffer)
Overlapping parameters to memcpy() via StrToIp6()
PACK ReadValue() crash vulnerability
Potential use of uninitialized memory via IPToInAddr6()

4 memory leaks. While the amount of leakage is very small per time, these bugs can finally cause process crash by out of memory. So these bugs must be fixed.

Memory leak in NnReadDnsRecord
Memory leak in RadiusLogin()
Memory leak via ParsePacketIPv4WithDummyMacHeader
Remote memory leak in OpenVPN server code

1 coding improvement. This is not a bug, however, I fixed the code to avoid furture misunderstanding.

RecvAll can return success on failure (leading to use of uninitialized memory)

Contributors for this bugfix:

- Max Planck Institute for Molecular Genetics
- Guido Vranken
2018-01-15 10:25:10 +09:00
Daiyuu Nobori
9f9dc459a7 Preparing the development branch 2017-10-19 15:00:41 +09:00
dnobori
faee11ff09 v4.23-9647-beta 2017-10-18 18:24:21 +09:00
dnobori
17e624ac26 v4.19-9605-beta 2016-03-06 23:16:01 +09:00
dnobori
4e862a7e40 v4.19-9582-beta 2015-10-06 20:18:00 +09:00
dnobori
860f743dd7 v4.17-9566-beta 2015-07-17 00:31:57 +09:00
dnobori
10d4b2c43d v4.10-9505-beta 2014-10-04 00:09:23 +09:00
dnobori
9f7d8578a7 v4.10-9472-beta 2014-07-12 02:06:20 +09:00
dnobori
719ee999d6 v4.07-9448-rtm 2014-06-06 06:53:20 +09:00
dnobori
cf2a6a42bc v4.06-9430-beta 2014-03-20 05:45:05 +09:00
dnobori
001fd910fe v4.04-9412-rtm 2014-01-15 18:01:42 +09:00
dnobori
749497dde0 v4.03-9408-rtm 2014-01-04 22:00:08 +09:00