[Bug 42648] PSNow (Playstation Now) v9.0.5 installer fails (Wine' s Enhanced RSA provider lacks support of SHA-2 variants)

wine-bugs at winehq.org wine-bugs at winehq.org
Fri Apr 28 14:10:39 CDT 2017


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

Anastasius Focht <focht at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |41356
            Summary|PSNow (Playstation Now)     |PSNow (Playstation Now)
                   |installer fails             |v9.0.5 installer fails
                   |                            |(Wine's Enhanced RSA
                   |                            |provider lacks support of
                   |                            |SHA-2 variants)
          Component|-unknown                    |rsaenh
                 CC|                            |focht at gmx.net

--- Comment #2 from Anastasius Focht <focht at gmx.net> ---
Hello folks,

confirming. There are multiple problems with this installer.

Tidbit: installer requires 'Windows 7', now being default WINEPREFIX setting.

--- snip ---
0087:trace:msi:MSI_ProcessMessage (nil) 0x4aceeb 0x4acefe 2003fff 10 L"Action
start 10:31:14: LaunchConditions."
...
0087:trace:msi:MSI_EvaluateConditionW 0 <- L"( Version9X OR VersionNT64 OR (
VersionNT AND (((VersionNT <> 501) OR ((VersionNT = 501) AND (ServicePackLevel
>= 1))) OR VersionNT64) AND (((VersionNT <> 501) OR ((VersionNT = 501) AND
(ServicePackLevel <> 1))) OR VersionNT64) AND (((VersionNT <> 501) OR
((VersionNT = 501) AND (ServicePackLevel <> 2"...
...
--- snip ---

--- snip ---
$ WINEDEBUG=+tid,+seh,+relay,+msi,+crypt,+wintrust wine
./PlayStationNow-9.0.5.exe >>log.txt 2>&1
...
0061:Call KERNEL32.CreateProcessW(00000000,00aacc34
L"\"Z:\\home\\focht\\Downloads\\PlayStationNow-9.0.5.exe\" /i
\"C:\\users\\focht\\Application Data\\Sony Interactive Entertainment Network
America LLC\\PlayStation\2122Now 9.0.5\\install\\98DE4F6\\PlayStationNow.msi\"
CLIENTPROCESSID=\"90\" SECONDSEQUENCE=\"1\" CHAINERUIPROCESSID=\"90Chainer\"
ACTION=\""...,00000000,00000000,00000000,00000410,00000000,00000000,00aac710,00aac700)
ret=7d8496c0
...
006f:Call KERNEL32.__wine_kernel_init() ret=7bc69e7c
0061:Ret  KERNEL32.CreateProcessW() retval=00000001 ret=7d8496c0
...
006f:Call msi.MsiGetFileSignatureInformationW(001c2c98
L"Z:\\home\\focht\\Downloads\\PlayStationNow-9.0.5.exe",00000001,0033f24c,00000000,00000000)
ret=004b33b4
006f:trace:msi:MsiGetFileSignatureInformationW
L"Z:\\home\\focht\\Downloads\\PlayStationNow-9.0.5.exe" 00000001 0x33f24c (nil)
(nil)
...
006f:Call wintrust.WinVerifyTrustEx(ffffffff,7dd59fac,0033f174) ret=7dca728a
...
006f:Ret  wintrust.WinVerifyTrustEx() retval=80090008 ret=7dca728a
006f:Call wintrust.WinVerifyTrustEx(ffffffff,7dd59fac,0033f174) ret=7dca737b
...
006f:Ret  wintrust.WinVerifyTrustEx() retval=00000000 ret=7dca737b
006f:Ret  msi.MsiGetFileSignatureInformationW() retval=80090008 ret=004b33b4
006f:Call
KERNEL32.FormatMessageW(00001300,00000000,80090008,00000400,0033f21c,00000000,00000000)
ret=004b4b90
006f:Ret  KERNEL32.FormatMessageW() retval=00000000 ret=004b4b90
006f:trace:seh:raise_exception code=c0000005 flags=0 addr=0x40884d ip=0040884d
tid=006f
006f:trace:seh:raise_exception  info[0]=00000000
006f:trace:seh:raise_exception  info[1]=00000000
006f:trace:seh:raise_exception  eax=00000000 ebx=80090008 ecx=0033f250
edx=0000013d esi=00000000 edi=0033f250
006f:trace:seh:raise_exception  ebp=0033f22c esp=0033f1f4 cs=0023 ds=002b
es=002b fs=0063 gs=006b flags=00210246
006f:trace:seh:call_stack_handlers calling handler at 0x50f36f code=c0000005
flags=0 
--- snip ---

The installer tries to display the error message text from an earlier rsaenh
API failure and Wine fails to provide it.

0x80090008 = NTE_BAD_ALGID -> 'Invalid algorithm specified'

The installer doesn't expect failure and crashes when accessing the message
buffer.

0x1300 = FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS |
FORMAT_MESSAGE_ALLOCATE_BUFFER

Anyway, there is no need to add this to kernel32 'winerror.mc' if the rsaenh
API problems get fixed beforehand.

--- snip ---
...
004a:trace:crypt:CryptFindOIDInfo (1, 0x1979d4, 0)
004a:trace:crypt:CryptFindOIDInfo CRYPT_OID_INFO_OID_KEY:
"2.16.840.1.101.3.4.2.1"
004a:Call KERNEL32.lstrcmpA(7d10e100 "1.3.14.3.2.26",001979d4
"2.16.840.1.101.3.4.2.1") ret=7d0f5161
...
004a:Call KERNEL32.lstrcmpA(7d10ee11 "1.3.6.1.4.1.311.10.3.13",001979d4
"2.16.840.1.101.3.4.2.1") ret=7d0f5161
004a:Ret  KERNEL32.lstrcmpA() retval=ffffffff ret=7d0f5161
004a:Call KERNEL32.lstrcmpA(7d10ee29 "2.5.29.32.0",001979d4
"2.16.840.1.101.3.4.2.1") ret=7d0f5161
004a:Ret  KERNEL32.lstrcmpA() retval=00000001 ret=7d0f5161
004a:Call
advapi32.CryptCreateHash(001c2ae0,00000000,00000000,00000000,001c2118)
ret=7d0e7bbe
004a:trace:crypt:CryptCreateHash (0x1c2ae0, 0x0, 0x0, 00000000, 0x1c2118)
004a:Call rsaenh.CPCreateHash(00000001,00000000,00000000,00000000,001c30f0)
ret=7ed357ed
004a:trace:crypt:RSAENH_CPCreateHash (hProv=00000001, Algid=00000000,
hKey=00000000, dwFlags=00000000, phHash=0x1c30f0)
004a:Ret  rsaenh.CPCreateHash() retval=00000000 ret=7ed357ed
004a:Ret  advapi32.CryptCreateHash() retval=00000000 ret=7d0e7bbe
004a:Ret  crypt32.CryptMsgUpdate() retval=00000000 ret=7d0442fe
...
004a:trace:wintrust:SOFTPUB_GetMessageFromFile returning -2146893816
...
--- snip ---

https://msdn.microsoft.com/en-us/library/windows/desktop/aa381133(v=vs.85).aspx

OID '2.16.840.1.101.3.4.2.1' -> CALG_SHA_256

There is Wine bug 41356 with Wine-Staging patchset ("crypt32: Recognize
sha256/384/512 KEY OIDs.") attached:

https://github.com/wine-compholio/wine-staging/tree/master/patches/crypt32-SHA_OIDs

It makes it run a little further but still fails.

The real problem is Wine's Enhanced RSA provider not supporting SHA-2 variants.

--- snip ---
...
0061:Call crypt32.CertOIDToAlgId(001c4f44 "2.16.840.1.101.3.4.2.1")
ret=7cfb5a41
0061:trace:crypt:CryptFindOIDInfo (1, 0x1c4f44, 0)
0061:trace:crypt:CryptFindOIDInfo CRYPT_OID_INFO_OID_KEY:
"2.16.840.1.101.3.4.2.1" 
...
0061:Ret  crypt32.CertOIDToAlgId() retval=0000800c ret=7cfb5a41
0061:Call
advapi32.CryptAcquireContextW(0033eea8,00000000,00000000,00000001,f0000000)
ret=7cfb5a75
0061:trace:crypt:CryptAcquireContextW (0x33eea8, (null), (null), 1, f0000000)
0061:Call rsaenh.CPAcquireContext(001c9618,00000000,f0000000,001c7220)
ret=7ed351ba
0061:trace:crypt:RSAENH_CPAcquireContext (phProv=0x1c9618, pszContainer=(null),
dwFlags=f0000000, pVTable=0x1c7220)
...
0061:Ret  rsaenh.CPAcquireContext() retval=00000001 ret=7ed351ba
0061:Ret  advapi32.CryptAcquireContextW() retval=00000001 ret=7cfb5a75
0061:Call
advapi32.CryptCreateHash(001c9608,0000800c,00000000,00000000,0033eea4)
ret=7cfb5aab
0061:trace:crypt:CryptCreateHash (0x1c9608, 0x800c, 0x0, 00000000, 0x33eea4)
0061:Call rsaenh.CPCreateHash(00000004,0000800c,00000000,00000000,001c4f90)
ret=7ed3589d
0061:trace:crypt:RSAENH_CPCreateHash (hProv=00000004, Algid=0000800c,
hKey=00000000, dwFlags=00000000, phHash=0x1c4f90)
0061:Ret  rsaenh.CPCreateHash() retval=00000000 ret=7ed3589d 
...
0061:trace:wintrust:SoftpubLoadMessage returning 1 (80090008)
0061:Ret  wintrust.SoftpubLoadMessage() retval=00000001 ret=7cfb877b
0061:trace:wintrust:WINTRUST_DefaultVerify returning 80090008
...
--- snip ---

--- snip ---
Wine-dbg>bt

Backtrace:
=>0 0x7d0f8df5 RSAENH_CPCreateHash(hProv=0x4, Algid=0x800c, hKey=0, dwFlags=0,
phHash=0x1a2700)
[/home/focht/projects/wine/wine.repo/staging-src/dlls/rsaenh/rsaenh.c:1865] in
rsaenh (0x0033ef08)
  1 0x7cfaeaab SOFTPUB_VerifyImageHash+0x11e(data=0x1a1e48, file=0x8c)
[/home/focht/projects/wine/wine.repo/staging-src/dlls/wintrust/softpub.c:357]
in wintrust (0x0033ef88)
  2 0x7cfaf1c5 SOFTPUB_LoadFileMessage+0xed(data=0x1a1e48)
[/home/focht/projects/wine/wine.repo/staging-src/dlls/wintrust/softpub.c:567]
in wintrust (0x0033efb8)
  3 0x7cfaf405 SoftpubLoadMessage+0x9f(data=<couldn't compute location>)
[/home/focht/projects/wine/wine.repo/staging-src/dlls/wintrust/softpub.c:635]
in wintrust (0x0033eff8)
  4 0x7cfb177b WINTRUST_ExecuteSteps+0x2e(steps=0x33f054, numSteps=0x5,
provData=0x1a1e48)
[/home/focht/projects/wine/wine.repo/staging-src/dlls/wintrust/wintrust_main.c:196]
in wintrust (0x0033f038)
  5 0x7cfb1b3d WINTRUST_DefaultVerify+0x12b(hwnd=0xffffffff,
actionID=0x7dd430cc, data=0x33f174)
[/home/focht/projects/wine/wine.repo/staging-src/dlls/wintrust/wintrust_main.c:308]
in wintrust (0x0033f0a8)
  6 0x7cfb3570 WinVerifyTrust+0x227(hwnd=<couldn't compute location>,
ActionID=<couldn't compute location>, ActionData=<couldn't compute location>)
[/home/focht/projects/wine/wine.repo/staging-src/dlls/wintrust/wintrust_main.c:731]
in wintrust (0x0033f108)
  7 0x7cfb3642 WinVerifyTrustEx+0x22(hwnd=<couldn't compute location>,
ActionID=<couldn't compute location>, ActionData=<couldn't compute location>)
[/home/focht/projects/wine/wine.repo/staging-src/dlls/wintrust/wintrust_main.c:751]
in wintrust (0x0033f138)
  8 0x7dc8fbbf MsiGetFileSignatureInformationW+0xfd(path=<couldn't compute
location>, flags=<couldn't compute location>, cert=<couldn't compute location>,
hash=<couldn't compute location>, hashlen=<couldn't compute location>)
[/home/focht/projects/wine/wine.repo/staging-src/dlls/msi/msi.c:2573] in msi
(0x0033f1c8)
  9 0x004b33b4 in playstationnow-9.0.5 (+0xb33b3) (0x0033f238)
  10 0x004b34b2 in playstationnow-9.0.5 (+0xb34b1) (0x0033f2c8)
...

Wine-dbg>p pKeyContainer->dwPersonality
  0x2
--- snip ---

--- snip ---
  #define RSAENH_PERSONALITY_BASE        0u
  #define RSAENH_PERSONALITY_STRONG      1u
  #define RSAENH_PERSONALITY_ENHANCED    2u
  #define RSAENH_PERSONALITY_SCHANNEL    3u
  #define RSAENH_PERSONALITY_AES         4u
--- snip ---

https://msdn.microsoft.com/en-us/library/windows/desktop/aa375549(v=vs.85).aspx

--- quote ---
CALG_SHA_256    0x0000800c    256 bit SHA hashing algorithm. This algorithm is
supported by Microsoft Enhanced RSA and AES Cryptographic Provider..

Windows XP with SP3:  This algorithm is supported by the Microsoft Enhanced RSA
and AES Cryptographic Provider (Prototype).

Windows XP with SP2, Windows XP with SP1 and Windows XP:  This algorithm is not
supported.
--- quote ---

https://source.winehq.org/git/wine.git/blob/6bad16363b4fd0587c5f49dc64b95966643ba576:/dlls/rsaenh/rsaenh.c#l199

--- snip ---
 199  {
 200   {CALG_RC2,      128, 40,  128,0,                    4,"RC2",     24,"RSA
Data Security's RC2"},
 201   {CALG_RC4,      128, 40,  128,0,                    4,"RC4",     24,"RSA
Data Security's RC4"},
 202   {CALG_DES,       56, 56,   56,0,                    4,"DES",    
31,"Data Encryption Standard (DES)"},
 203   {CALG_3DES_112, 112,112,  112,0,                   13,"3DES TWO
KEY",19,"Two Key Triple DES"},
 204   {CALG_3DES,     168,168,  168,0,                    5,"3DES",   
21,"Three Key Triple DES"},
 205   {CALG_SHA,      160,160,  160,CRYPT_FLAG_SIGNING,   6,"SHA-1",  
30,"Secure Hash Algorithm (SHA-1)"},
 206   {CALG_MD2,      128,128,  128,CRYPT_FLAG_SIGNING,   4,"MD2",    
23,"Message Digest 2 (MD2)"},
 207   {CALG_MD4,      128,128,  128,CRYPT_FLAG_SIGNING,   4,"MD4",    
23,"Message Digest 4 (MD4)"},
 208   {CALG_MD5,      128,128,  128,CRYPT_FLAG_SIGNING,   4,"MD5",    
23,"Message Digest 5 (MD5)"},
 209   {CALG_SSL3_SHAMD5,288,288,288,0,                   12,"SSL3
SHAMD5",12,"SSL3 SHAMD5"},
 210   {CALG_MAC,        0,  0,    0,0,                    4,"MAC",    
28,"Message Authentication Code"},
 211  
{CALG_RSA_SIGN,1024,384,16384,CRYPT_FLAG_SIGNING|CRYPT_FLAG_IPSEC,9,"RSA_SIGN",14,"RSA
Signature"},
 212  
{CALG_RSA_KEYX,1024,384,16384,CRYPT_FLAG_SIGNING|CRYPT_FLAG_IPSEC,9,"RSA_KEYX",17,"RSA
Key Exchange"},
 213   {CALG_HMAC,       0,  0,    0,0,                    5,"HMAC",   
18,"Hugo's MAC (HMAC)"},
 214   {0,               0,  0,    0,0,                    1,"",         1,""}
 215  },
--- snip ---

After fixing this problem, the installer runs further but ultimately fails due
to bug 34989 ("Multiple installers using Caphyon 'Advanced Installer' (AI)
technology hang (Atlassian SourceTree v1.3.2, League of Legends 2013+)
(deferred type 1 custom action executed before regular type 1 custom action)")

--- snip ---
...
007b:Call KERNEL32.CreateFileW(00743fa0
L"\\\\.\\pipe\\ToServerAdvinst_Extract_Z:\\home\\focht\\Downloads\\PlayStationNow-9.0.5.exe",c0000000,00000000,00000000,00000003,00000000,00000000)
ret=00369e57
007b:Ret  KERNEL32.CreateFileW() retval=00000108 ret=00369e57 
...
007b:Call KERNEL32.WriteFile(00000108,00741580,00000004,00e5e79c,00000000)
ret=0036a0bb
007b:Ret  KERNEL32.WriteFile() retval=00000001 ret=0036a0bb
007b:Call KERNEL32.FlushFileBuffers(00000108) ret=0036a0c4
005a:Ret  KERNEL32.WaitForSingleObject() retval=00000102 ret=00487943
005a:Call KERNEL32.WaitForSingleObject(00000078,000000c8) ret=00487943
005a:Ret  KERNEL32.WaitForSingleObject() retval=00000102 ret=00487943
005a:Call KERNEL32.WaitForSingleObject(00000078,000000c8) ret=00487943 
...
--- snip ---

$ wine --version
wine-2.6-312-gae600c0

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