Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-18948

Winsock WSADuplicateSocket fails to duplicate sockets from other processes

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Major
    • None
    • Networking
    • None

    Description

      According to MS Docs WSADuplicateSocket can duplicate sockets created from one process into another process. Currently the ReactOS version of the function does not do that. I am working on test code for this issue but it was observed while working on testing for CORE-17554. Tracing indicates that the the current code completely ignores the source PID parameter and calls WsSockGetSocket() and WsSockGetSocket() internally calls WsGetProcess()which simply returns the process structure for the current PID and then fails to find the socket.

      Attachments

        1. SOCK_SHR.zip
          9 kB
        2. Sockdupc.exe
          45 kB
        3. Sockdups.exe
          53 kB
        4. VirtualBox_ROS-TEST_01_05_2023_16_37_04.png
          VirtualBox_ROS-TEST_01_05_2023_16_37_04.png
          25 kB
        5. VirtualBox_W2K3-x86_01_05_2023_16_42_09.png
          VirtualBox_W2K3-x86_01_05_2023_16_42_09.png
          26 kB
        6. wi10-sockdup.png
          wi10-sockdup.png
          54 kB

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bugdude bugdude
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: