scapy icon indicating copy to clipboard operation
scapy copied to clipboard

TCP Retransmission causes scapy to exit

Open stulle123 opened this issue 2 years ago • 1 comments

Brief description

Hi,

I have a pcap file where a TCP Retransmission (the 7th packet) causes scapy to exit with the following error message: WARNING: Socket <scapy.utils.PcapReader object at 0x000001FE8B3192D0> failed with 'not enough values to unpack (expected 3, got 2)'. It was closed.

Scapy stops processing the pcap file after that.

The bug was introduced with https://github.com/secdev/scapy/pull/4082.

Cheers,

stulle123

Scapy version

2.5.0.dev157

Python version

3.11.2

Operating system

Windows 10

Additional environment information

No response

How to reproduce

from scapy.config import conf
from scapy.main import load_layer
from scapy.sendrecv import sniff
from scapy.sessions import TCPSession

conf.tls_session_enable = True
load_layer("tls")

capture = sniff(
    offline="bar.pcap",
    session=TCPSession,
)

Actual result

No response

Expected result

No response

Related resources

No response

stulle123 avatar Nov 27 '23 18:11 stulle123

Should be fixed in https://github.com/secdev/scapy/pull/4224

gpotter2 avatar Jan 20 '24 14:01 gpotter2