Merge pull request #960 from lnslbrty/fix/heap-overflow-in-llc-readear-util

Fixed heap overflow caused by missing lengthcheck in 802.11 LLC heade…
This commit is contained in:
Luca Deri
2020-07-13 10:23:06 +02:00
committed by GitHub
+2
View File
@@ -1686,6 +1686,8 @@ struct ndpi_proto ndpi_workflow_process_packet(struct ndpi_workflow * workflow,
break;
/* Check ether_type from LLC */
if(header->caplen < (eth_offset + wifi_len + radio_len + sizeof(struct ndpi_llc_header_snap)))
return(nproto);
llc = (struct ndpi_llc_header_snap*)(packet + eth_offset + wifi_len + radio_len);
if(llc->dsap == SNAP)
type = ntohs(llc->snap.proto_ID);