New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Recursion error: maximum recursion depth exceeded with scapy 2.4.3 on Fedora Linux #2406
Comments
It's too early to be certain, but running passer with a filter that drops tcp port 53 packets (-b 'not tcp port 53') appears to allow passer to run much longer that it would have otherwise. (Please don't take this as claiming that the only source of this problem is TCP port 53 packets). |
Here is a way to extract the packet that triggers the issue To reproduce, do:
I will provide a fix. |
Thank you!
…On Sat, Jan 11, 2020 at 6:29 AM Guillaume Valadon ***@***.***> wrote:
Here is a way to extract the packet that triggers the issue tcpdump -r
scapy243.recursion_issue.notudp.port53.notip6.pcap -w
issues/issue_2406.pcap -c 11924,11925. It is available in
issue_2406.pcap.gz
<https://github.com/secdev/scapy/files/4049266/issue_2406.pcap.gz>.
To reproduce, do:
p = rdpcap("issue_2406.pcap")[0]
p[Raw]
I will provide a fix.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2406?email_source=notifications&email_token=AA272WONNFBBUZKZ6SXR5ZTQ5GUQBA5CNFSM4KFK6ESKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIV732Q#issuecomment-573308394>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA272WNYIPJPYDTA2TPCQDDQ5GUQBANCNFSM4KFK6ESA>
.
|
This issue is caused by two distinct problems:
|
See #2408 for the first fix. |
See #2411 for the second fix. |
#2411 won't be merged. The main issue was already fixed and merged. |
I'm able to reproduce this with scapy 2.4.3 on Fedora Linux. I have a pcap file containing ipv4 tcp port 53 packets that when run through passer ( https://github.com/activecm/passer/ ) gives the following:
Traceback (most recent call last):
File "/home/wstearns/med/programming/passer/passer.py", line 2428, in
sniff(store=0, offline=work_filename, filter=cl_args['bpf'], prn=lambda x: processpacket(x))
File "/usr/lib/python3.5/site-packages/scapy/sendrecv.py", line 972, in sniff
sniffer._run(*args, **kwargs)
File "/usr/lib/python3.5/site-packages/scapy/sendrecv.py", line 925, in _run
session.on_packet_received(p)
File "/usr/lib/python3.5/site-packages/scapy/sessions.py", line 47, in on_packet_received
result = self.prn(pkt)
File "/home/wstearns/med/programming/passer/passer.py", line 2428, in
sniff(store=0, offline=work_filename, filter=cl_args['bpf'], prn=lambda x: processpacket(x))
File "/home/wstearns/med/programming/passer/passer.py", line 1714, in processpacket
if p.getlayer(Raw):
File "/usr/lib/python3.5/site-packages/scapy/packet.py", line 1148, in getlayer
_subclass=_subclass, **flt)
File "/usr/lib/python3.5/site-packages/scapy/packet.py", line 1148, in getlayer
_subclass=_subclass, **flt)
File "/usr/lib/python3.5/site-packages/scapy/packet.py", line 1148, in getlayer
_subclass=_subclass, **flt)
...
File "/usr/lib/python3.5/site-packages/scapy/packet.py", line 1148, in getlayer
_subclass=_subclass, **flt)
File "/usr/lib/python3.5/site-packages/scapy/packet.py", line 1148, in getlayer
_subclass=_subclass, **flt)
File "/usr/lib/python3.5/site-packages/scapy/packet.py", line 1115, in getlayer
if isinstance(cls, int):
RecursionError: maximum recursion depth exceeded while calling a Python object
Command line used:
passer.py -r scapy243.recursion_issue.notudp.port53.notip6.pcap >/dev/null
Please let me know if I can provide anything else to reproduce this.
scapy243.recursion_issue.notudp.port53.notip6.pcap.zip
Originally posted by @william-stearns in #1552 (comment)
The text was updated successfully, but these errors were encountered: