1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-11-22 01:19:52 +03:00

Compare commits

..

7 Commits

Author SHA1 Message Date
Naoki Kaneko
ecb0beb30d
Merge 06e79fd75d into b8fbb3e3d8 2024-07-04 15:52:37 +08:00
Ilya Shipitsin
b8fbb3e3d8
Merge pull request #2025 from chipitsine/fedora_pull_request
CI: enable Fedora Rawgide on pull requests
2024-07-03 23:43:19 +02:00
Ilia Shipitsin
98a8d5249d CI: enable Fedora Rawgide on pull requests 2024-07-03 23:21:44 +02:00
Ilya Shipitsin
dd2a53e049
Merge pull request #2024 from chipitsine/master
bump version for upcoming 5186 release
2024-07-03 21:16:01 +02:00
Ilia Shipitsin
7ce9c088ff bump version for upcoming 5186 release 2024-07-03 19:20:14 +02:00
Ilya Shipitsin
c2a7aa5481
Merge pull request from GHSA-j35p-p8pj-vqxq
src/Cedar/Proto_IKE.c: ignore packets with no IPSec SA
2024-06-22 18:57:28 +02:00
Ilia Shipitsin
6f57449164 src/Cedar/Proto_IKE.c: ignore packets with no IPSec SA
many thanks to Jonathan Phillibert from Amazon Web Services
for investigating and reporting that responding to such packets
might lead to traffic amplification
2024-06-22 18:53:35 +02:00
4 changed files with 7 additions and 32 deletions

View File

@ -4,6 +4,7 @@ on:
schedule:
- cron: "0 0 25 * *"
push:
pull_request:
workflow_dispatch:
permissions:

View File

@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.10)
set(BUILD_NUMBER CACHE STRING "The number of the current build.")
if ("${BUILD_NUMBER}" STREQUAL "")
set(BUILD_NUMBER "5185")
set(BUILD_NUMBER "5186")
endif()
if (BUILD_NUMBER LESS 5180)

View File

@ -1,5 +1,5 @@
{
"environments": [ { "BuildNumber": "5185" } ],
"environments": [ { "BuildNumber": "5186" } ],
"configurations": [
{
"name": "x64-native",

View File

@ -463,39 +463,13 @@ void ProcIPsecEspPacketRecv(IKE_SERVER *ike, UDPPACKET *p)
seq = READ_UINT(src + sizeof(UINT));
// Search and retrieve the IPsec SA from SPI
// thank to @phillibert report, responding to bad SA might lead to amplification
// according to RFC4303 we should drop such packets
ipsec_sa = SearchClientToServerIPsecSaBySpi(ike, spi);
if (ipsec_sa == NULL)
{
// Invalid SPI
UINT64 init_cookie = Rand64();
UINT64 resp_cookie = 0;
IKE_CLIENT *c = NULL;
IKE_CLIENT t;
Copy(&t.ClientIP, &p->SrcIP, sizeof(IP));
t.ClientPort = p->SrcPort;
Copy(&t.ServerIP, &p->DstIP, sizeof(IP));
t.ServerPort = p->DestPort;
t.CurrentIkeSa = NULL;
if (p->DestPort == IPSEC_PORT_IPSEC_ESP_RAW)
{
t.ClientPort = t.ServerPort = IPSEC_PORT_IPSEC_ISAKMP;
}
c = Search(ike->ClientList, &t);
if (c != NULL && c->CurrentIkeSa != NULL)
{
init_cookie = c->CurrentIkeSa->InitiatorCookie;
resp_cookie = c->CurrentIkeSa->ResponderCookie;
}
SendInformationalExchangePacketEx(ike, (c == NULL ? &t : c), IkeNewNoticeErrorInvalidSpiPayload(spi), false,
init_cookie, resp_cookie);
SendDeleteIPsecSaPacket(ike, (c == NULL ? &t : c), spi);
return;
}