Wireshark-bugs: [Wireshark-bugs] [Bug 9309] New: [PATCH] wiretap: Fix crash on unexpected header

Date: Mon, 21 Oct 2013 09:28:32 +0000
Bug ID 9309
Summary [PATCH] wiretap: Fix crash on unexpected header sizes
Classification Unclassified
Product Wireshark
Version SVN
Hardware All
OS All
Status UNCONFIRMED
Severity Major
Priority Low
Component Capture file support (libwiretap)
Assignee [email protected]
Reporter [email protected]

Build Information:
Tested with: 1.10.2; SVN 52729 (both are affected)
--
When reading a truncated gzipped capture file, a segfault occurs when
libpcap_read_header tries to write to err_info (which is NULL in
libpcap_try).

After this patch, libpcap_try will only pass errors to the caller when
fatal read or parse errors occur.

Test:

    randpkt -c 1 -t icmp - | gzip -9 | head -c-1 > short.pcap.gz
    capinfos short.pcap.gz
    tshark -r short.pcap.gz

Expected result:

    capinfos: An error occurred after reading 1 packets from
    "short.pcap.gz": Less data was read than was expected.

Actual result: segfault.


You are receiving this mail because:
  • You are watching all bug changes.