threads / discuss / 56658

Re: Security issues with openssl.exe

Subject: Re: Security issues with openssl.exe

## tl;dr

2 messages between Oct 7, 2021 and Oct 7, 2021.

replies: 1people: 2as markdown or json

Rene Hutschenreuter· Oct 7, 2021, 10:22 UTC · lore
Dear Sir or Madam,

in our company we currently use GIT for programming tasks. Furthermore we use a VPN to connect to the company network.

This VPN now prevents this connection due to a security problem with
the "openssl.exe" in the GIT installation folder:
- C:\Program Files\Git\mingw64\bin\openssl.exe
Description-Text: In order to decrypt SM2 encrypted data an
application is expected to call the API function EVP_PKEY_decrypt().
Typically an application will call this function twice. The first
time, on entry, the \"out\" parameter can be NULL and, on exit, the
\"outlen\" parameter is populated with the buffer size required to
hold the decrypted plaintext. The application can then allocate a
sufficiently sized buffer and call EVP_PKEY_decrypt() again, but this
time passing a non-NULL value for the \"out\" parameter. A bug in the
implementation of the SM2 decryption code means that the calculation
of the buffer size required to hold the plaintext returned by the
first call to EVP_PKEY_decrypt() can be smaller than the actual size
required by the second call. This can lead to a buffer overflow when
EVP_PKEY_decrypt() is called by the application a second time with a
buffer that is too small. A malicious attacker who is able present SM2
content for decryption to an application could cause attacker chosen
data to overflow the buffer by up to a maximum of 62 bytes altering
the contents of other data held after the buffer, possibly changing
application behaviour or causing the application to crash. The
location of the buffer is application dependent but is typically heap
allocated. Fixed in OpenSSL 1.1.1l (Affected 1.1.1-1.1.1k).

Could you please provide a new Git version with an updated openssl.exe to fix this security issues?

Best regards René Hutschenreuter Developer

Matthias Aßhauer· Oct 7, 2021, 16:28 UTC · re: Rene Hutschenreuter · lore
On Thu, 7 Oct 2021, Rene Hutschenreuter wrote:
Show 32 quoted lines
> Dear Sir or Madam,
>
> in our company we currently use GIT for programming tasks. Furthermore
> we use a VPN to connect to the company network.
>
> This VPN now prevents this connection due to a security problem with
> the "openssl.exe" in the GIT installation folder:
> - C:\Program Files\Git\mingw64\bin\openssl.exe
>
> Description-Text: In order to decrypt SM2 encrypted data an
> application is expected to call the API function EVP_PKEY_decrypt().
> Typically an application will call this function twice. The first
> time, on entry, the \"out\" parameter can be NULL and, on exit, the
> \"outlen\" parameter is populated with the buffer size required to
> hold the decrypted plaintext. The application can then allocate a
> sufficiently sized buffer and call EVP_PKEY_decrypt() again, but this
> time passing a non-NULL value for the \"out\" parameter. A bug in the
> implementation of the SM2 decryption code means that the calculation
> of the buffer size required to hold the plaintext returned by the
> first call to EVP_PKEY_decrypt() can be smaller than the actual size
> required by the second call. This can lead to a buffer overflow when
> EVP_PKEY_decrypt() is called by the application a second time with a
> buffer that is too small. A malicious attacker who is able present SM2
> content for decryption to an application could cause attacker chosen
> data to overflow the buffer by up to a maximum of 62 bytes altering
> the contents of other data held after the buffer, possibly changing
> application behaviour or causing the application to crash. The
> location of the buffer is application dependent but is typically heap
> allocated. Fixed in OpenSSL 1.1.1l (Affected 1.1.1-1.1.1k).
>
> Could you please provide a new Git version with an updated openssl.exe
> to fix this security issues?

This sounds like you're talking about Git for Windows and specifically CVE-2021-3711. The Git for Windows team assesed the situation and determined the issue unlikely to be exploitable via Git's usage of OpenSSL.

The next regular Git for Windows release (likely 2.34.0, to be released soon after the 15th of November) will include OpenSSL 1.1.1l (or newer). In the meantime you can try the latest snapshot[1] to get a Git for Windows build that includes OpenSSL 1.1.1l.

[1] https://wingit.blob.core.windows.net/files/index.html
> Best regards
> René Hutschenreuter
> Developer
>
Best regards
Matthias Aßhauer

← back to recent threads