>Number:         157188
>Category:       misc
>Synopsis:       libpcap
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 19 22:00:27 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Peter Losher
>Release:        8.2-RELEASE
>Organization:
Internet Systems Consortium
>Environment:
FreeBSD freebsd8.lab.isc.org 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Thu Feb 17 
02:41:51 UTC 2011     [email protected]:/usr/obj/usr/src/sys/GENERIC  
amd64
>Description:
One of our engineers @ISC discovered that there is a bug in the currently 
released version of libpcap (in base and in ports) that can be triggered when 
using an "ip6 protochain" filter.  It's due to the fairly complicated BPF 
bytecode that libpcap generates for IPv6 header chasing combined with a sign 
extension bug when processing JA (jump absolute) opcodes.  (JA is used to go 
backwards and without sign extension on 64 bit platforms the BPF interpreter 
incorrectly jumps forward... a lot.)

>How-To-Repeat:
root@freebsd8:~# tcpdump -nr ip6-hopbyhop-icmp.pcap 'ip6 protochain 58'
reading from file ip6-hopbyhop-icmp.pcap, link-type EN10MB (Ethernet)
Segmentation fault: 11 (core dumped)

>Fix:
There is a fix in the libpcap repository:

https://github.com/mcr/libpcap/commit/ecdc5c0a7f7591a7cd4aff696e42757c677fbbf7

but the tcpdump-workers have been pretty tardy about putting out newer code, so 
it sits there stalled.

With the patch applied, it all works well and you should see something like 
this:

-=-
$ tcpdump -nr ip6-hopbyhop-icmp.pcap 'ip6 protochain 58' 
reading from file ip6-hopbyhop-icmp.pcap, link-type EN10MB (Ethernet)
18:43:07.098489 IP6 fe80::208:7dff:feb7:2cca > ff02::1: HBH ICMP6, multicast 
listener queryv2  [gaddr ::], length 28
-=-

>Release-Note:
>Audit-Trail:
>Unformatted:
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to