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

ldr: kernel32: jump to invalid memory when launching application that does not import from kernel32

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • None
    • NTCore, RosDlls
    • None

    Description

      CreateProcess sets the initial EIP to kernel32!BaseProcessStartThunk.
      If the process in question does not import from kernel32, there is no kernel32.dll loaded at that location, so the app crashes on start.
      We need to ensure that kernel32 is loaded for all Win32 processes.

      Access violation - code c0000005 (first chance)
      First chance exceptions are reported before any exception handling.
      This exception may be expected and handled.
      001b:77de546b ?? ???
      kd> g
      (../../subsystems/win32/csrss/csrsrv/api/wapi.c:1235) Exception in 23c.240. Killing...

      Test case attached.

      Attachments

        1. empty.c
          0.1 kB
        2. empty.exe
          1.0 kB

        Issue Links

          Activity

            People

              fireball fireball
              ThFabba ThFabba
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: