You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(toolkit): the pypcapfile engine parses a later IPv4 fragment's data as a TCP header #1576
With engine='pypcapfile', TCP reassembly reads a later IPv4 fragment's data as a TCP header, and a bogus segment comes out of it.
Repro on main (cc084357f), Python 3.11, pypcapfile 0.12.0. A PCAP holds a SYN, then an IPv4 fragment with offset 1480, protocol 6, and 40 octets of data starting AAAA.
Default engine: no TCP datagram.
pypcapfile: a TCP datagram whose payload is b'B' * 20.
Cause:_transport() in pcapkit/toolkit/pypcapfile.py only checks the protocol number, not whether the frame is a first fragment. #1562 fixed the default engine's version of this.
Expected: a fragment with a non-zero offset is not parsed as a TCP header, as in the default engine.
Activity
fix(toolkit): pypcapfile TCP reads past VLAN tags, warns of tunnels, …
fix(toolkit): pypcapfile TCP reads past VLAN tags, warns of tunnels, …
fix(toolkit): pypcapfile TCP reads past VLAN tags, warns of tunnels, …
fix(toolkit): pypcapfile TCP reads past VLAN tags, warns of tunnels, …
refactor(toolkit): revert pypcapfile's agreement-only code (#1708) (#…