Skip to content

Commit

Permalink
Merge pull request #1824 from chipitsine/master
Browse files Browse the repository at this point in the history
src/Cedar/Proto_OpenVPN.c: fix denial of service found by Cisco Talos
  • Loading branch information
chipitsine committed Apr 16, 2023
2 parents 6ff0ce7 + d2e673a commit 82ce34f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Cedar/Proto_OpenVPN.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 82ce34f

Please sign in to comment.