zeek/testing/btest/Traces/trunc/ipv4-internally-truncated-header.pcap
Johanna Amann 924ed053c7 Fix OOB read in Sessions.cc
IP packets that have a header length that is greater than the total
length of the packet cause a integer overflow, which cause range-checks
to fail, which causes OOB reads.

Furthermore Bro does not currently check the version field of IP packets
that are read from tunnels. I added this check - otherwhise Bro reports
bogus IP information in its error messages, just converting the data
from the place where the IP information is supposed to be to IPs.

This behavior brings us closer to what other software (e.g. Wireshark)
displays in these cases.
2017-10-19 10:29:29 -07:00

74 B