Wireshark-bugs: [Wireshark-bugs] [Bug 7511] New: crashes in interface list, pipe handling

Date: Sat, 21 Jul 2012 08:28:31 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7511

           Summary: crashes in interface list, pipe handling
           Product: Wireshark
           Version: SVN
          Platform: x86
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: Low
         Component: Wireshark
        AssignedTo: bugzilla-admin@xxxxxxxxxxxxx
        ReportedBy: wireshark@xxxxxxxxx


Build Information:
linux (redhat, debian), svn head
--
Hi,

there's some crashes related to interface list, pipes

mkfifo /home/martin/tmp/wpipe
wireshark -i /home/martin/tmp/wpipe

select Interface List -> segmentation fault

The pipe's interface_t is initialized by scan_local_interfaces(). However,
device.if_info remains uninitialized. set_ip_addr_label() wants to read
if_info->name and crashes when name points to random data.

If a pipe is added via Capture / Options / Manage Interfaces, it's initialized
in add_pipe_cb(), where if_info.name is set to NULL. If I bring up the
interface list and tick/untick such an interface, wireshark crashes in
store_selected() when a strcmp() is run on the name.

Lastly, a pipe initialized by scan_local_interfaces() has an undefined "locked"
field. Sometimes I could not activate/deactive the interface in the interface
list as it was locked by default.

The attached patch should handle all of this. If you see any side effects,
please let me know. (Can't test on windows at the moment) Otherwise, I'll
commit this tomorrow and schedule it for 1.8.1, where I could reproduce these
issues as well.

Thanks,

   Martin

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.