Added detection for WordPress exploits
Fixed ndpi_iph_is_valid_and_not_fragmented() that was bugged with non UDP traffic
This commit is contained in:
+9
-4
@@ -4604,12 +4604,17 @@ u_int8_t ndpi_iph_is_valid_and_not_fragmented(const struct ndpi_iphdr *iph, cons
|
||||
1: not fragmented
|
||||
*/
|
||||
//#ifdef REQUIRE_FULL_PACKETS
|
||||
if(ipsize < iph->ihl * 4 || ipsize < ntohs(iph->tot_len) || ntohs(iph->tot_len) < iph->ihl * 4 ||
|
||||
(iph->frag_off & htons(0x1FFF)) != 0) {
|
||||
return(0);
|
||||
|
||||
if(iph->protocol == IPPROTO_UDP) {
|
||||
if((ipsize < iph->ihl * 4)
|
||||
|| (ipsize < ntohs(iph->tot_len))
|
||||
|| (ntohs(iph->tot_len) < iph->ihl * 4)
|
||||
|| (iph->frag_off & htons(0x1FFF)) != 0) {
|
||||
return(0);
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
|
||||
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user