https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=15696

            Bug ID: 15696
           Summary: ws_pipe_wait_for_pipe() can wait on closed handles
           Product: Wireshark
           Version: Git
          Hardware: x86
                OS: Windows 10
            Status: UNCONFIRMED
          Severity: Major
          Priority: Low
         Component: Common utilities (libwsutil)
          Assignee: bugzilla-ad...@wireshark.org
          Reporter: deso...@gmail.com
  Target Milestone: ---

Build Information:
Paste the COMPLETE build information from "Help->About Wireshark", "wireshark
-v", or "tshark -v".
--
After the:
                        pipeinsts[idx].pendingIO = FALSE;
                        CloseHandle(pipeinsts[idx].ol.hEvent);
                        num_waiting_to_connect--;

code is executed inside ws_pipe_wait_for_pipe(), the handles[] array is not
modified in any way. Thus on next loop iteration, WaitForMultipleObjects() will
contain closed handle in the handles array.

It is possible that another thread might create some new handle which will
essentially reuse the handle value.
Check https://devblogs.microsoft.com/oldnewthing/20120926-00/?p=6493 for some
insight why using closed handle is a bad thing.

The closed handle should be removed from the handles[] array.

-- 
You are receiving this mail because:
You are watching all bug changes.
___________________________________________________________________________
Sent via:    Wireshark-bugs mailing list <wireshark-bugs@wireshark.org>
Archives:    https://www.wireshark.org/lists/wireshark-bugs
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-bugs
             mailto:wireshark-bugs-requ...@wireshark.org?subject=unsubscribe

Reply via email to