[Bug 48984] New: Riot Vanguard (Riot Games) 'vgk.sys' crashes on unimplemented function ntoskrnl.exe.{vswprintf_s,swprintf_s}

WineHQ Bugzilla wine-bugs at winehq.org
Tue Apr 21 12:10:40 CDT 2020


https://bugs.winehq.org/show_bug.cgi?id=48984

            Bug ID: 48984
           Summary: Riot Vanguard (Riot Games) 'vgk.sys' crashes on
                    unimplemented function
                    ntoskrnl.exe.{vswprintf_s,swprintf_s}
           Product: Wine
           Version: 5.6
          Hardware: x86-64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ntoskrnl
          Assignee: wine-bugs at winehq.org
          Reporter: focht at gmx.net
      Distribution: ---

Hello folks,

as it says. It lacks the imports from msvcrt.

--- snip ---
...
The vgk service is starting.
002d:trace:loaddll:load_native_dll Loaded
L"C:\\windows\\system32\\kernelbase.dll" at 0x7b000000: PE builtin
002d:trace:loaddll:load_so_dll Loaded L"C:\\windows\\system32\\kernel32.dll" at
0x7b410000: builtin
002d:trace:loaddll:load_native_dll Loaded
L"C:\\windows\\system32\\winedevice.exe" at 0x140000000: PE builtin
002d:trace:loaddll:load_so_dll Loaded L"C:\\windows\\system32\\advapi32.dll" at
0x7f1b5dfa0000: builtin
002d:trace:loaddll:load_so_dll Loaded L"C:\\windows\\system32\\msvcrt.dll" at
0x7f1b5ddc0000: builtin
002d:trace:loaddll:load_native_dll Loaded
L"C:\\windows\\system32\\ntoskrnl.exe" at 0x180000000: PE builtin
002d:trace:loaddll:load_so_dll Loaded L"C:\\windows\\system32\\ucrtbase.dll" at
0x7f1b5dca0000: builtin
002d:trace:loaddll:load_native_dll Loaded L"C:\\windows\\system32\\rpcrt4.dll"
at 0x9b0000: PE builtin
002f:trace:loaddll:load_native_dll Loaded L"C:\\windows\\system32\\cng.sys" at
0x1070000: native
002f:trace:loaddll:load_native_dll Loaded L"C:\\Program Files\\Riot
Vanguard\\vgk.sys" at 0xd60000: native
wine: Call from 0x7bc6dd4c to unimplemented function ntoskrnl.exe.vswprintf_s,
aborting
wine: Unimplemented function ntoskrnl.exe.vswprintf_s called at address 
--- snip ---

--- snip ---
The vgk service is starting.
005d:trace:loaddll:load_native_dll Loaded
L"C:\\windows\\system32\\kernelbase.dll" at 0x7b000000: PE builtin
005d:trace:loaddll:load_so_dll Loaded L"C:\\windows\\system32\\kernel32.dll" at
0x7b410000: builtin
005d:trace:loaddll:load_native_dll Loaded
L"C:\\windows\\system32\\winedevice.exe" at 0x140000000: PE builtin
005d:trace:loaddll:load_so_dll Loaded L"C:\\windows\\system32\\advapi32.dll" at
0x7f06de310000: builtin
005d:trace:loaddll:load_so_dll Loaded L"C:\\windows\\system32\\msvcrt.dll" at
0x7f06de130000: builtin
005d:trace:loaddll:load_native_dll Loaded
L"C:\\windows\\system32\\ntoskrnl.exe" at 0x180000000: PE builtin
005d:trace:loaddll:load_so_dll Loaded L"C:\\windows\\system32\\ucrtbase.dll" at
0x7f06de000000: builtin
005d:trace:loaddll:load_native_dll Loaded L"C:\\windows\\system32\\rpcrt4.dll"
at 0x9b0000: PE builtin
005f:trace:loaddll:load_native_dll Loaded L"C:\\windows\\system32\\cng.sys" at
0x1070000: native
005f:trace:loaddll:load_native_dll Loaded L"C:\\Program Files\\Riot
Vanguard\\vgk.sys" at 0xd60000: native
wine: Call from 0x7bc6dd4c to unimplemented function ntoskrnl.exe.swprintf_s,
aborting
wine: Unimplemented function ntoskrnl.exe.swprintf_s called at address
000000007BC6DD4C (thread 005f), starting debugger...
--- snip ---

--- snip ---
$ winedump -j import vgk.sys
Contents of vgk.sys: 3196560 bytes

Import Table size: 00000050
  offset 0001e090 cng.sys
  Hint/Name Table: 00022108
  TimeDateStamp:   00000000 (Thu Jan  1 01:00:00 1970)
  ForwarderChain:  00000000
  First thunk RVA: 0001B028
   Thunk    Ordn  Name
  0001b028     8  BCryptDestroyHash
  0001b030     1  BCryptCloseAlgorithmProvider

  offset 0001e0a4 ntoskrnl.exe
  Hint/Name Table: 00022120
  TimeDateStamp:   00000000 (Thu Jan  1 01:00:00 1970)
  ForwarderChain:  00000000
  First thunk RVA: 0001B040
   Thunk    Ordn  Name
  0001b040  1081  KeIpiGenericCall
  0001b048  2777  __C_specific_handler
  0001b050   196  ExFreePoolWithTag
  0001b058  2801  _stricmp
  0001b060  2897  wcscat_s
  0001b068  2901  wcscpy_s
  0001b070  2060  RtlInitUnicodeString
  0001b078  2571  ZwCreateFile
  0001b080  2705  ZwReadFile
  0001b088  2775  ZwWriteFile
  0001b090  2560  ZwClose
  0001b098  2604  ZwFlushBuffersFile
  0001b0a0  2697  ZwQuerySystemInformation
  0001b0a8  2259  RtlTimeToTimeFields
  0001b0b0   986  KeAreAllApcsDisabled
  0001b0b8   302  ExSystemTimeToLocalTime
  0001b0c0  2885  swprintf_s
  0001b0c8  2895  vswprintf_s
  0001b0d0  2818  _vsnwprintf
  0001b0d8  1049  KeInitializeApc
  0001b0e0  1074  KeInsertQueueApc
  0001b0e8   157  ExAllocatePoolWithTag
  0001b0f0   990  KeBugCheckEx

Done dumping vgk.sys
--- snip ---

Wine source:

https://source.winehq.org/git/wine.git/blob/f31a29b8d1ea478af28f14cdaf3db1515a932853:/dlls/ntoskrnl.exe/ntoskrnl.exe.spec

You should consider adding with -norelay otherwise you might end up with:

--- snip ---
...
002f:trace:ntoskrnl:ExAllocatePoolWithTag 156 pool 512 -> 00000000008A0390
002f:Ret  ntoskrnl.exe.ExAllocatePoolWithTag() retval=008a0390 ret=0115fcbe
002f:Call ntoskrnl.exe.swprintf_s(008a0390,0000004d,00d4f450
L"%s%s\\Logs\\%s_%s%s",00d4f420) ret=0115f461
002f:trace:seh:raise_exception code=c0000005 flags=0 addr=0x7f40717b2931
ip=7f40717b2931 tid=002f
002f:trace:seh:raise_exception  info[0]=0000000000000000
002f:trace:seh:raise_exception  info[1]=ffffffffffb50f10
002f:trace:seh:raise_exception  rax=ffffffffffb50f10 rbx=0000000000d4eee0
rcx=00000000ffffffff rdx=ffffffffffb50f10
002f:trace:seh:raise_exception  rsi=0000000000d4f0e0 rdi=00007f40717aa1c0
rbp=00000000ffffffff rsp=0000000000d4edd0
002f:trace:seh:raise_exception   r8=0000000000d4eee0  r9=0000000000000000
r10=0000000000000000 r11=0000000000000000
002f:trace:seh:raise_exception  r12=00007f40717aa1c0 r13=0000000000d4f0e0
r14=0000000000d4f456 r15=0000000000000000
002f:trace:seh:call_vectored_handlers calling handler at 0x18000ba50
code=c0000005 flags=0
002f:trace:seh:call_vectored_handlers handler at 0x18000ba50 returned 0
002f:trace:seh:dwarf_virtual_unwind function 7f40717b2931 base 0x7f40717b2580 
...
--- snip ---

$ sha1sum setup.exe 
08deca4c0b46a3481e706926c0217d1c944d22a3  setup.exe

$ du -sh setup.exe 
15M    setup.exe

$ wine --version
wine-5.6-258-gf31a29b8d1

Regards

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


More information about the wine-bugs mailing list