Skip to content

Commit

Permalink
kmod-oaf: https parser check data length
Browse files Browse the repository at this point in the history
  • Loading branch information
jjm2473 committed Mar 14, 2024
1 parent 6b33d54 commit 1d089f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions oaf/src/app_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -488,11 +488,11 @@ int dpi_https_proto(flow_info_t *flow)
AF_ERROR("flow is NULL\n");
return -1;
}
if (NULL == p || data_len == 0)
if (NULL == p || data_len <= 0xb0)
{
return -1;
}
if (!(p[0] == 0x16 && p[1] == 0x03 && p[2] == 0x01))
if (!(p[0] == 0x16 && p[1] == 0x03 && p[2] == 0x01 && p[5] == 0x01)) // TLS Handshake TLS 1.0 Client Hello
return -1;


Expand Down

0 comments on commit 1d089f0

Please sign in to comment.