https://bugs.winehq.org/show_bug.cgi?id=39582
Bug ID: 39582 Summary: Battlefield 3 (Origin) tries to verify installation using bcrypt. Product: Wine Version: 1.7.54 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: bcrypt Assignee: wine-bugs@winehq.org Reporter: bernhardu@vr-web.de Distribution: Debian
Created attachment 52734 --> https://bugs.winehq.org/attachment.cgi?id=52734 bcrypt: Change/implement some functions to succeed for bf3.exe.
An attempt to start an Origin installation of Battlefield 3 is followed by this message: Error Your game data is corrupt. Please repair your installation through Origin
In the console output there appears this line: fixme:bcrypt:BCryptOpenAlgorithmProvider 0x300de48, L"RSA", (null), 00000000 - stub
Attached (quick) hack modifies/adds BCryptOpenAlgorithmProvider, BCryptImportKeyPair, BCryptVerifySignature, BCryptDestroyKey, BCryptCloseAlgorithmProvider, succeeding on every input parameters. With this applied bf3.exe stops complaining about this and continues.
https://bugs.winehq.org/show_bug.cgi?id=39582
super_man@post.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |super_man@post.com
https://bugs.winehq.org/show_bug.cgi?id=39582
jre.winesim@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jre.winesim@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=39582
Bernhard Übelacker bernhardu@vr-web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #52734|0 |1 is obsolete| |
--- Comment #1 from Bernhard Übelacker bernhardu@vr-web.de --- Created attachment 52759 --> https://bugs.winehq.org/attachment.cgi?id=52759 bcrypt: Try to forward BCryptVerifySignature to CryptVerifySignatureW.
Instead of just returning success try to validate the hash and signature.
https://bugs.winehq.org/show_bug.cgi?id=39582
Vijay Kamuju infyquest@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |infyquest@gmail.com
--- Comment #2 from Vijay Kamuju infyquest@gmail.com --- Please send this to wine-devel@winehq.org and wine-patches@winehq.org
https://bugs.winehq.org/show_bug.cgi?id=39582
Christopher Larson kergoth@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |kergoth@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=39582
Bernhard Übelacker bernhardu@vr-web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #52759|0 |1 is obsolete| |
--- Comment #3 from Bernhard Übelacker bernhardu@vr-web.de --- Created attachment 53518 --> https://bugs.winehq.org/attachment.cgi?id=53518 As now bcrypt uses gnutls, this changed patch now uses also gnutls for verification.
https://bugs.winehq.org/show_bug.cgi?id=39582
--- Comment #4 from Vijay Kamuju infyquest@gmail.com --- I think it would be better to split the patches (better based on functions being implemented along with their corresponding tests) and send to wine-patches@winehq.org
https://bugs.winehq.org/show_bug.cgi?id=39582
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
https://bugs.winehq.org/show_bug.cgi?id=39582
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Battlefield 3 (Origin) |Battlefield 3 (Origin) |tries to verify |requires bcrypt RSA to |installation using bcrypt. |verify installation files Ever confirmed|0 |1 Status|UNCONFIRMED |NEW
--- Comment #5 from Bruno Jesus 00cpxxx@gmail.com --- Confirming.
https://bugs.winehq.org/show_bug.cgi?id=39582
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |erikmnkl@gmail.com
--- Comment #6 from Sebastian Lackner sebastian@fds-team.de --- *** Bug 40677 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=39582
winetest@luukku.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |winetest@luukku.com
--- Comment #7 from winetest@luukku.com --- Does any of these help?
https://github.com/wine-compholio/wine-staging/tree/master/patches/bcrypt-Im...
Or do they touch in another area of code? I would suggest offering these patches to wine-staging.
https://bugs.winehq.org/show_bug.cgi?id=39582
--- Comment #8 from winetest@luukku.com --- Well this is interesting.
patching file dlls/bcrypt/bcrypt.spec Hunk #1 succeeded at 9 with fuzz 2. Hunk #2 succeeded at 32 with fuzz 1 (offset 1 line). Hunk #3 succeeded at 50 (offset 1 line). patching file dlls/bcrypt/bcrypt_main.c Hunk #1 succeeded at 27 (offset 1 line). Hunk #2 succeeded at 57 with fuzz 2. Hunk #3 FAILED at 91. Hunk #4 FAILED at 184. Hunk #5 succeeded at 237 (offset 26 lines). Hunk #6 succeeded at 640 with fuzz 1 (offset -23 lines). 2 out of 6 hunks FAILED -- saving rejects to file dlls/bcrypt/bcrypt_main.c.rej patching file dlls/bcrypt/tests/bcrypt.c Hunk #1 succeeded at 997 with fuzz 1 (offset 602 lines). Hunk #2 FAILED at 612. 1 out of 2 hunks FAILED -- saving rejects to file dlls/bcrypt/tests/bcrypt.c.rej patching file include/bcrypt.h Hunk #1 succeeded at 70 with fuzz 2 (offset 3 lines). Hunk #2 FAILED at 76. Hunk #3 FAILED at 86. 2 out of 3 hunks FAILED -- saving rejects to file include/bcrypt.h.rej
Patch needs rebase.
https://bugs.winehq.org/show_bug.cgi?id=39582
fjfrackiewicz@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fjfrackiewicz@gmail.com
--- Comment #9 from fjfrackiewicz@gmail.com --- (In reply to winetest from comment #8)
Well this is interesting.
patching file dlls/bcrypt/bcrypt.spec Hunk #1 succeeded at 9 with fuzz 2. Hunk #2 succeeded at 32 with fuzz 1 (offset 1 line). Hunk #3 succeeded at 50 (offset 1 line). patching file dlls/bcrypt/bcrypt_main.c Hunk #1 succeeded at 27 (offset 1 line). Hunk #2 succeeded at 57 with fuzz 2. Hunk #3 FAILED at 91. Hunk #4 FAILED at 184. Hunk #5 succeeded at 237 (offset 26 lines). Hunk #6 succeeded at 640 with fuzz 1 (offset -23 lines). 2 out of 6 hunks FAILED -- saving rejects to file dlls/bcrypt/bcrypt_main.c.rej patching file dlls/bcrypt/tests/bcrypt.c Hunk #1 succeeded at 997 with fuzz 1 (offset 602 lines). Hunk #2 FAILED at 612. 1 out of 2 hunks FAILED -- saving rejects to file dlls/bcrypt/tests/bcrypt.c.rej patching file include/bcrypt.h Hunk #1 succeeded at 70 with fuzz 2 (offset 3 lines). Hunk #2 FAILED at 76. Hunk #3 FAILED at 86. 2 out of 3 hunks FAILED -- saving rejects to file include/bcrypt.h.rej
Patch needs rebase.
Part of that might have something to do with some of the bcrypt patches being moved from Wine Staging to Wine development.
https://bugs.winehq.org/show_bug.cgi?id=39582
Bernhard Übelacker bernhardu@mailbox.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #53518|0 |1 is obsolete| |
--- Comment #10 from Bernhard Übelacker bernhardu@mailbox.org --- Created attachment 57775 --> https://bugs.winehq.org/attachment.cgi?id=57775 Patch rebased against wine-2.5.
Changed the tests, that generate the data for test_BCryptVerifySignature. Also load dynamically now functions like other bcrypt tests.
https://bugs.winehq.org/show_bug.cgi?id=39582
tokktokk fdsfgs@krutt.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fdsfgs@krutt.org
https://bugs.winehq.org/show_bug.cgi?id=39582
lucas.francesco93@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas.francesco93@gmail.com
--- Comment #11 from lucas.francesco93@gmail.com --- does not happen to me, can you guys please retest it?
https://bugs.winehq.org/show_bug.cgi?id=39582
Bernhard Übelacker bernhardu@mailbox.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #57775|0 |1 is obsolete| |
https://bugs.winehq.org/show_bug.cgi?id=39582
Gijs Vermeulen gijsvrm@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |gijsvrm@gmail.com
--- Comment #12 from Gijs Vermeulen gijsvrm@gmail.com --- (In reply to lucas.francesco93 from comment #11)
does not happen to me, can you guys please retest it?
Are you using Wine-staging? Because https://dev.wine-staging.com/patches/208/ was merged there to fix this issue. This also means that this bug should be marked 'STAGED'.
https://bugs.winehq.org/show_bug.cgi?id=39582
--- Comment #13 from Bernhard Übelacker bernhardu@mailbox.org --- Created attachment 59642 --> https://bugs.winehq.org/attachment.cgi?id=59642 Some notes how I came there and what other hurdles were hit.
(In reply to lucas.francesco93 from comment #11)
does not happen to me, can you guys please retest it?
You are using 2.10-staging from looking at your AppDB report?
In wine-staging is a series of bcrypt patches now included [1], that seem to offer the needed funcitonality for this bug. (Especially patch 0035*.) Unfortunately these patches are not yet through to the regular wine tree. Therefore I think this bug remains open. (Should it be marked as "staged"?)
[1] https://github.com/wine-compholio/wine-staging/tree/master/patches/bcrypt-Im...
https://bugs.winehq.org/show_bug.cgi?id=39582
--- Comment #14 from lucas.francesco93@gmail.com --- (In reply to Bernhard Übelacker from comment #13)
Created attachment 59642 [details] Some notes how I came there and what other hurdles were hit.
(In reply to lucas.francesco93 from comment #11)
does not happen to me, can you guys please retest it?
You are using 2.10-staging from looking at your AppDB report?
In wine-staging is a series of bcrypt patches now included [1], that seem to offer the needed funcitonality for this bug. (Especially patch 0035*.) Unfortunately these patches are not yet through to the regular wine tree. Therefore I think this bug remains open. (Should it be marked as "staged"?)
[1] https://github.com/wine-compholio/wine-staging/tree/master/patches/bcrypt- Improvements
im always using the most recent staging build, since 2.10 wine got some bcrypt patches too and i tought all patches got mainlined, but since this isn't true this should be marked as STAGED as the bug is not present on staging since quite come time.
https://bugs.winehq.org/show_bug.cgi?id=39582
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12@gmail.com Status|NEW |STAGED Staged patchset| |https://github.com/wine-sta | |ging/wine-staging/tree/mast | |er/patches/bcrypt-Improveme | |nts
https://bugs.winehq.org/show_bug.cgi?id=39582
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|STAGED |RESOLVED Fixed by SHA1| |b3c8723bd4f3b23f02a7460e1a2 | |28fb5855e3475 CC| |leslie_alistair@hotmail.com Resolution|--- |FIXED
--- Comment #15 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- Fixed by https://source.winehq.org/git/wine.git/?a=commit;h=b3c8723bd4f3b23f02a7460e1...
https://bugs.winehq.org/show_bug.cgi?id=39582
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #16 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 3.5.