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

Shortcuts execute non-EXE targets

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 0.4.15
    • Shell

    Description

      0.4.15-dev-3780-gbf16435-x86-gcc-lin-dbg

      Opening a shortcut seems to try and execute the target file regardless of the extension.

      The quickest way to replicate this is to open the "Read Me" shortcut on the desktop and watch the debug log for:

      (/dll/win32/kernel32/client/proc.c:3417) '\??\X:\reactos\readme.txt': Invalid EXE, and not a batch or script file

      This works for more than just the readme. If you rename an executable to an innocuous extension like ".txt" and create a shortcut to it, opening the shortcut will run the disguised program instead of the expected text editor.

       

      The attached patch corrects the behavior of "Run" and shortcuts by checking the file's extension in SHELL_execute before trying to create a process out of it.

       

      https://github.com/reactos/reactos/pull/4363

      Attachments

        1. 0001-SHELL32-Stop-SHELL_execute-from-always-executing-fil.patch
          3 kB
          AlexMiccolis
        2. Capture.PNG
          168 kB
          AlexMiccolis
        3. DebugOut.log
          43 kB
          AlexMiccolis
        4. Invalid_Exe.png
          104 kB
          AlexMiccolis
        5. ROS_running_txt_as_exe_from_cmdline.png
          68 kB
          hbelusca
        6. Win2k3_RunDlg_exe_as_txt.png
          67 kB
          hbelusca

        Issue Links

          Activity

            People

              hbelusca hbelusca
              AlexM AlexMiccolis
              Votes:
              3 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: