OpenSSL CMS AuthEnvelopedData 解析中的栈缓冲区溢出。
在解析 CMS AuthEnvelopedData 内容中的 AEAD 密码参数(例如 AES-GCM)时,evp_cipher_get_asn1_aead_params() 存在栈缓冲区溢出。超大的 IV 会溢出 16 字节的栈缓冲区,导致拒绝服务并可能远程执行代码。
| 分支 | 受影响版本 | 修复版本 |
|---|---|---|
| 3.6.x | 3.6.0 | 3.6.1+ |
| 3.5.x | 3.5.0-3.5.4 | 3.5.5+ |
| 3.4.x | 3.4.0-3.4.3 | 3.4.4+ |
| 3.3.x | 3.3.0-3.3.5 | 3.3.6+ |
| 3.0.x | 3.0.0-3.0.18 | 3.0.19+ |
OpenSSL 1.x 不受影响。
.
├── README.md
├── dos.py # DoS exploit
└── vulnerable_service/
├── Dockerfile # Builds vulnerable test service
├── entrypoint.sh # Container entrypoint
└── cms_server.c # Vulnerable HTTP CMS parser
cd vulnerable_service
docker build -t vuln-cms .
docker run --rm -p 8080:8080 --privileged vuln-cms
python3 dos.py <host> <port>
# Example:
python3 dos.py localhost 8080