Bug Overview
Description:
Dynamic tracing reveals that the official Nginx docker image is passing an anomalous parameter to the OpenSSL EVP_CipherInit_ex function. The enc parameter is being set to 2.
Expected Behavior
According to the official OpenSSL manual, the enc parameter should only accept 1 (encrypt), 0 (decrypt), or -1 (leave unchanged). While OpenSSL currently tolerates this due to permissive internal checks, this is undocumented behavior and could break in future cryptographic updates.
Steps to Reproduce the Bug
Reproduction Environment:
- Nginx Docker Tag:
1.27.4
- Image ID:
97662d24417b
Environment Details
> uname -a
Linux x1-c 6.8.0-111-generic #111~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Apr 14 17:13:45 UTC x86_64 x86_64 x86_64 GNU/Linux
> docker compose version
Docker Compose version v5.1.3
Additional Context
Additional Context:
This behavior appears specifically in pre-built configurations like the Docker image mentioned above. When OpenSSL and Nginx are built manually from source, this anomalous parameter passing disappears. This suggests the issue might be tied to how the libraries are compiled or linked in the official image environment.
Could the maintainers investigate what is causing Nginx (or its included modules) to pass 2 to the cipher initialization context in this specific build?
Related Issue
openssl/openssl#31357
Bug Overview
Description:
Dynamic tracing reveals that the official Nginx docker image is passing an anomalous parameter to the OpenSSL
EVP_CipherInit_exfunction. Theencparameter is being set to2.Expected Behavior
According to the official OpenSSL manual, the
encparameter should only accept1(encrypt),0(decrypt), or-1(leave unchanged). While OpenSSL currently tolerates this due to permissive internal checks, this is undocumented behavior and could break in future cryptographic updates.Steps to Reproduce the Bug
Reproduction Environment:
1.27.497662d24417bEnvironment Details
Additional Context
Additional Context:
This behavior appears specifically in pre-built configurations like the Docker image mentioned above. When OpenSSL and Nginx are built manually from source, this anomalous parameter passing disappears. This suggests the issue might be tied to how the libraries are compiled or linked in the official image environment.
Could the maintainers investigate what is causing Nginx (or its included modules) to pass
2to the cipher initialization context in this specific build?Related Issue
openssl/openssl#31357