1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-12-25 01:29:53 +03:00

Merge pull request #1824 from chipitsine/master

src/Cedar/Proto_OpenVPN.c: fix denial of service found by Cisco Talos
This commit is contained in:
Ilya Shipitsin 2023-04-17 00:22:03 +02:00 committed by GitHub
commit 82ce34fccb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -147,7 +147,7 @@ bool OvsProcessData(void *param, TCP_RAW_DATA *in, FIFO *out)
payload_size = READ_USHORT(FifoPtr(fifo));
packet_size = payload_size + sizeof(USHORT);
if (payload_size == 0 || packet_size > sizeof(buf))
if (payload_size == 0 || payload_size > (sizeof(buf) - sizeof(USHORT)))
{
ret = false;
Debug("OvsProcessData(): Invalid payload size: %u bytes\n", payload_size);