Skip to content

Zero block in IPv6 route prefix misinterpreted #359

Closed
@0xb35c

Description

@0xb35c

Hi,
if you have a zero block in one of your route prefixes scapy will die with a "Illegal syntax for IP address" exception.

$ route -6n
Kernel IPv6 routing table
Destination                    Next Hop                   Flag Met Ref Use If
fd00:2001:0:c020::/64          ::                         U    600 1     3 wlp4s0

In arch/linux.py:263 the route is read and d is set to fd0020010000c0200000000000000000.
This parsed in the function inet_pton from pton_ntop.py and incorrectly truncated to fd00:2001::c020:: (the correct value for that example would be fd00:2001:0:c020::), which again is validated from the same function at a later point and causes the exception.

I installed scapy in a virtualenv and with pacman. Running sudo scapy and from scapy.all import * in ipython causes the exception.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions