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:
@@ -1686,6 +1686,8 @@ struct ndpi_proto ndpi_workflow_process_packet(struct ndpi_workflow * workflow,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
/* Check ether_type from LLC */
|
/* 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);
|
llc = (struct ndpi_llc_header_snap*)(packet + eth_offset + wifi_len + radio_len);
|
||||||
if(llc->dsap == SNAP)
|
if(llc->dsap == SNAP)
|
||||||
type = ntohs(llc->snap.proto_ID);
|
type = ntohs(llc->snap.proto_ID);
|
||||||
|
|||||||
Reference in New Issue
Block a user