mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 07:08:19 +00:00
Consider cap len when forwarding into packet analysis.
When forwarding into packet analysis from TCP or UDP, the protocol's length fields were trusted. This might be dangerous in case of truncated packets.
This commit is contained in:
parent
136d54a68e
commit
fb2042ca76
3 changed files with 6 additions and 4 deletions
|
@ -125,7 +125,7 @@ void TCPAnalyzer::DeliverPacket(Connection* c, double t, bool is_orig, int remai
|
|||
pkt->session = c;
|
||||
|
||||
// Send the packet back into the packet analysis framework.
|
||||
ForwardPacket(len, data, pkt);
|
||||
ForwardPacket(std::min(len, remaining), data, pkt);
|
||||
|
||||
// Call DeliverPacket on the adapter directly here. Normally we'd call ForwardPacket
|
||||
// but this adapter does some other things in its DeliverPacket with the packet children
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue