http://bugs.winehq.org/show_bug.cgi?id=23317
Summary: SEC_E_INTERNAL_ERROR (0x80090304) returned by InitializeSecurityContextW Product: Wine Version: 1.2-rc4 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: secur32 AssignedTo: wine-bugs@winehq.org ReportedBy: mterrisse@free.fr
Hello,
I am working on a product called EdT (http://www.index-education.com/fr/telecharger-edt.php). Sorry the product is available in French and Italian but not in English. The product contains an internal mailer that can use TLS when sending e-mails to a SMTP server. For testing we used smtp.gmail.com. This works fine on Windows but fails on Wine (Wine 1.2-rc 4, Ubuntu 9.10).
Here is the TLS handshake after the command STARTTLS was sent :
81 bytes
<< 1388 bytes
65536 bytes
<< 273 bytes
182 bytes
<< 7 bytes -> InitializeSecurityContextW returns SEC_E_INTERNAL_ERROR (0x80090304)
With WINEDEBUG I can have more information:
0009:Call secur32.InitializeSecurityContextW(015b5448,015b5450,00000000,0000801c,00000000,00000000,0031e104,00000000,00000000,0031e110,0031e160,0031e154) ret=0050d193 GNUTLS ERROR: A record packet with illegal version was received. 0009:Ret secur32.InitializeSecurityContextW() retval=80090304 ret=0050d193
Note that the TLS handshake is not the same on Windows and Wine, here is what happens on Windows
113 bytes
<< 1400 bytes << 267 bytes
182 bytes
<< 43 bytes
There is not the big 65536 bytes buffer to send. And 65536 is exactlty the size of the buffer passed to InitializeSecurityContextW, as if cbBuffer of the destination SecBuffer was not updated (we don't use ISC_REQ_ALLOCATE_MEMORY but allocate the buffer before invoking InitializeSecurityContextW).
This bug looks similar to http://bugs.winehq.org/show_bug.cgi?id=16200 but I am not sure it is the same problem.
I hope this helps. Regards,
Michel
http://bugs.winehq.org/show_bug.cgi?id=23317
--- Comment #1 from Michel Terrisse mterrisse@free.fr 2010-06-23 04:02:33 --- Created an attachment (id=29077) --> (http://bugs.winehq.org/attachment.cgi?id=29077) Command line executable that connects to smtp.gmail.com
I wrote a command line executable that is simplier to use. It works fine on Windows and fails on Wine. Here sockets are in blocking mode, and GMail closes the socket after we send the 65536 bytes.
http://bugs.winehq.org/show_bug.cgi?id=23317
--- Comment #2 from Michel Terrisse mterrisse@free.fr 2010-08-02 09:18:24 --- Hello,
Any news about this bug ? Just ask me if you need more info to reproduce it.
Regards,
Michel Terrisse
http://bugs.winehq.org/show_bug.cgi?id=23317
--- Comment #3 from Michel Terrisse mterrisse@free.fr 2010-09-13 09:31:26 CDT --- This is a serious problem for our customers. The problem occurs with EdT 2010 ProNOTE 2010 ProfNOTE 2010
Can someone have a look, please ?
Michel Terrisse
http://bugs.winehq.org/show_bug.cgi?id=23317
--- Comment #4 from Juan Lang juan_lang@yahoo.com 2010-09-13 11:13:06 CDT --- It looks like GNUTLS is having difficulty with the connection: GNUTLS ERROR: A record packet with illegal version was received.
Try capturing the connection with Wireshark, and seeing if anything out of the ordinary is being exchanged.
http://bugs.winehq.org/show_bug.cgi?id=23317
--- Comment #5 from Michel Terrisse mterrisse@free.fr 2010-09-16 09:17:00 CDT --- Hello,
Thank you for your reply. It took me some time before I could use WireShark on Ubuntu (I configured a gateway that runs on Windows and with WireShark installed). But I could not notice anything strange in WireShark before the program sends 65536 bytes.
I upgraded to Wine 1.3.2, it changes nothing (I am running Ubuntu 10.04 LTS).
Can you reproduce the bug with TestGMailWine.exe attached? (http://bugs.winehq.org/attachment.cgi?id=29077)
Regards,
Michel
http://bugs.winehq.org/show_bug.cgi?id=23317
--- Comment #6 from Juan Lang juan_lang@yahoo.com 2010-09-16 10:26:48 CDT --- (In reply to comment #5)
Can you reproduce the bug with TestGMailWine.exe attached? (http://bugs.winehq.org/attachment.cgi?id=29077)
No. I get the following instead: FAILED: Violation d'accs l'adresse 004A9B91 dans le module 'TestGMailWine.exe'. Lecture de l'adresse FFFFFFFE
but I don't get any "InitializeSecurityContextW returns SEC_E_INTERNAL_ERROR (0x80090304)" error, nor do I get any GNUTLS errors.
http://bugs.winehq.org/show_bug.cgi?id=23317
Michel Terrisse mterrisse@free.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
--- Comment #7 from Michel Terrisse mterrisse@free.fr 2010-09-21 03:23:32 CDT --- Good news, I upgraded to Wine 1.3.3 and cannot reproduce the bug anymore. I think it can be considered as fixed.
On my side I tracked why you had an access violation and could fix the bug, this will be in the next production of EdT 2010, Pronote 2010 and ProfNote 2010 (this was something stupid, the code was testing if a strings ends with a carriage return 0x0D, 0x0A without testing that the length of the string is at least 2. With a null string you could have the access violation when trying a access memory at 0xFFFFFFFE).
Thank you for your help,
Best regards,
Michel
http://bugs.winehq.org/show_bug.cgi?id=23317
--- Comment #8 from Juan Lang juan_lang@yahoo.com 2010-09-21 11:12:59 CDT --- (In reply to comment #7)
Good news, I upgraded to Wine 1.3.3 and cannot reproduce the bug anymore. I think it can be considered as fixed.
Excellent :)
On my side I tracked why you had an access violation and could fix the bug,
Also good :)
http://bugs.winehq.org/show_bug.cgi?id=23317
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #9 from Alexandre Julliard julliard@winehq.org 2010-10-01 13:57:23 CDT --- Closing bugs fixed in 1.3.4.