Mounir ASSAF
2010-05-17 13:10:43 UTC
Hello,
I've noticed something odd while sniffing an ICMPv6 redirect packet with Scapy. It fails to correctly dissect the packet inside the ICMPv6NDOptRedirectedHdr layer. I think this is due to the reserved option "res" of this layer which is defined as a ShortField (2 bytes), when it should be a 6-bytes field (http://tools.ietf.org/html/rfc2461#page-31).
scapy/layers/inet6.py :
class ICMPv6NDOptRedirectedHdr(_ICMPv6NDGuessPayload, Packet):
....
XShortField("res",0),
TruncPktLenField("pkt", "", IPv6, 4,
length_from = lambda pkt: 8*pkt.len-4) ]
Regards,
Mounir
Mounir ASSAF
Expert s?curit? junior
Standard : +33 1 41 91 77 77 * Fax : +33 1 41 91 77 78
215, avenue Georges Clemenceau * 92024 NANTERRE
[cid:***@7797ecbd.fa174178]<http://www.laqualitedeviedudsi.com>
[cid:***@f51eb0e2.881a4a83]<http://www.intrinsec.com/>
I've noticed something odd while sniffing an ICMPv6 redirect packet with Scapy. It fails to correctly dissect the packet inside the ICMPv6NDOptRedirectedHdr layer. I think this is due to the reserved option "res" of this layer which is defined as a ShortField (2 bytes), when it should be a 6-bytes field (http://tools.ietf.org/html/rfc2461#page-31).
scapy/layers/inet6.py :
class ICMPv6NDOptRedirectedHdr(_ICMPv6NDGuessPayload, Packet):
....
XShortField("res",0),
TruncPktLenField("pkt", "", IPv6, 4,
length_from = lambda pkt: 8*pkt.len-4) ]
Regards,
Mounir
Mounir ASSAF
Expert s?curit? junior
Standard : +33 1 41 91 77 77 * Fax : +33 1 41 91 77 78
215, avenue Georges Clemenceau * 92024 NANTERRE
[cid:***@7797ecbd.fa174178]<http://www.laqualitedeviedudsi.com>
[cid:***@f51eb0e2.881a4a83]<http://www.intrinsec.com/>