{"thread":{"id":"56658","subject":"Re: Security issues with openssl.exe","startedAt":"2021-10-07T10:22:18Z","lastAt":"2021-10-07T16:28:17Z","messageCount":2,"participants":["Rene Hutschenreuter","Matthias Aßhauer"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"438141","messageId":"CAP_xbc=ag3+Bkvwtou4ZaYrnVm67kb37=oZEc5eTx8FsufhV=Q@mail.gmail.com","threadId":"56658","inReplyTo":"CAP_xbc=PZq2Qs8KUVYJVofpTxucf43TeSm8Bk4Pxcb0wn70KjQ@mail.gmail.com","subject":"Re: Security issues with openssl.exe","fromName":"Rene Hutschenreuter","fromEmail":"rene.hutschi@gmail.com","sentAt":"2021-10-07T10:22:05Z","receivedAt":"2021-10-07T10:22:18Z","isPatch":false,"sender":{"key":"rene.hutschi@gmail.com","avatar":null},"body":"Dear Sir or Madam,\n\nin our company we currently use GIT for programming tasks. Furthermore\nwe use a VPN to connect to the company network.\n\nThis VPN now prevents this connection due to a security problem with\nthe \"openssl.exe\" in the GIT installation folder:\n- C:\\Program Files\\Git\\mingw64\\bin\\openssl.exe\n\nDescription-Text: In order to decrypt SM2 encrypted data an\napplication is expected to call the API function EVP_PKEY_decrypt().\nTypically an application will call this function twice. The first\ntime, on entry, the \\\"out\\\" parameter can be NULL and, on exit, the\n\\\"outlen\\\" parameter is populated with the buffer size required to\nhold the decrypted plaintext. The application can then allocate a\nsufficiently sized buffer and call EVP_PKEY_decrypt() again, but this\ntime passing a non-NULL value for the \\\"out\\\" parameter. A bug in the\nimplementation of the SM2 decryption code means that the calculation\nof the buffer size required to hold the plaintext returned by the\nfirst call to EVP_PKEY_decrypt() can be smaller than the actual size\nrequired by the second call. This can lead to a buffer overflow when\nEVP_PKEY_decrypt() is called by the application a second time with a\nbuffer that is too small. A malicious attacker who is able present SM2\ncontent for decryption to an application could cause attacker chosen\ndata to overflow the buffer by up to a maximum of 62 bytes altering\nthe contents of other data held after the buffer, possibly changing\napplication behaviour or causing the application to crash. The\nlocation of the buffer is application dependent but is typically heap\nallocated. Fixed in OpenSSL 1.1.1l (Affected 1.1.1-1.1.1k).\n\nCould you please provide a new Git version with an updated openssl.exe\nto fix this security issues?\n\nBest regards\nRené Hutschenreuter\nDeveloper\n"},{"id":"438177","messageId":"AM0PR04MB6019545C115A7161E83881A8A5B19@AM0PR04MB6019.eurprd04.prod.outlook.com","threadId":"56658","inReplyTo":"CAP_xbc=ag3+Bkvwtou4ZaYrnVm67kb37=oZEc5eTx8FsufhV=Q@mail.gmail.com","subject":"Re: Security issues with openssl.exe","fromName":"Matthias Aßhauer","fromEmail":"mha1993@live.de","sentAt":"2021-10-07T16:28:12Z","receivedAt":"2021-10-07T16:28:17Z","isPatch":false,"sender":{"key":"mha1993@live.de","avatar":"https://avatars.githubusercontent.com/u/6178234?v=4"},"body":"\n\nOn Thu, 7 Oct 2021, Rene Hutschenreuter wrote:\n\n> Dear Sir or Madam,\n>\n> in our company we currently use GIT for programming tasks. Furthermore\n> we use a VPN to connect to the company network.\n>\n> This VPN now prevents this connection due to a security problem with\n> the \"openssl.exe\" in the GIT installation folder:\n> - C:\\Program Files\\Git\\mingw64\\bin\\openssl.exe\n>\n> Description-Text: In order to decrypt SM2 encrypted data an\n> application is expected to call the API function EVP_PKEY_decrypt().\n> Typically an application will call this function twice. The first\n> time, on entry, the \\\"out\\\" parameter can be NULL and, on exit, the\n> \\\"outlen\\\" parameter is populated with the buffer size required to\n> hold the decrypted plaintext. The application can then allocate a\n> sufficiently sized buffer and call EVP_PKEY_decrypt() again, but this\n> time passing a non-NULL value for the \\\"out\\\" parameter. A bug in the\n> implementation of the SM2 decryption code means that the calculation\n> of the buffer size required to hold the plaintext returned by the\n> first call to EVP_PKEY_decrypt() can be smaller than the actual size\n> required by the second call. This can lead to a buffer overflow when\n> EVP_PKEY_decrypt() is called by the application a second time with a\n> buffer that is too small. A malicious attacker who is able present SM2\n> content for decryption to an application could cause attacker chosen\n> data to overflow the buffer by up to a maximum of 62 bytes altering\n> the contents of other data held after the buffer, possibly changing\n> application behaviour or causing the application to crash. The\n> location of the buffer is application dependent but is typically heap\n> allocated. Fixed in OpenSSL 1.1.1l (Affected 1.1.1-1.1.1k).\n>\n> Could you please provide a new Git version with an updated openssl.exe\n> to fix this security issues?\n\nThis sounds like you're talking about Git for Windows and specifically\nCVE-2021-3711. The Git for Windows team assesed the situation and \ndetermined the issue unlikely to be exploitable via Git's usage of \nOpenSSL.\n\nThe next regular Git for Windows release (likely 2.34.0, to be released \nsoon after the 15th of November) will include OpenSSL 1.1.1l (or newer). In\nthe meantime you can try the latest snapshot[1] to get a Git for Windows\nbuild that includes OpenSSL 1.1.1l.\n\n[1] https://wingit.blob.core.windows.net/files/index.html\n\n> Best regards\n> René Hutschenreuter\n> Developer\n>\n\nBest regards\n\nMatthias Aßhauer\n"}]}