Summary: | Sendmail's STARTTLS broken for 12.1-RELEASE/12.0-RELEASE/12-STABLE/HEAD | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Dan Lukes <dan+freebsd.org> | ||||||
Component: | bin | Assignee: | Hiroki Sato <hrs> | ||||||
Status: | Closed FIXED | ||||||||
Severity: | Affects Some People | CC: | dinoex, gshapiro, hrs | ||||||
Priority: | --- | Keywords: | patch | ||||||
Version: | 12.1-RELEASE | ||||||||
Hardware: | Any | ||||||||
OS: | Any | ||||||||
See Also: | https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242862 | ||||||||
Attachments: |
|
Description
Dan Lukes
2019-12-24 15:18:44 UTC
Created attachment 210203 [details]
tls.c::sm_RSA_generate_key() patch, simpler version
Further analysis has discovered all bugs mentioned are caused by two forgotten/excessive lines. The duplicate call of BN_set_word (rc = BN_set_word(bn_rsa_r4, RSA_F4)) and the excessive "return NULL" that should not be here at all.
This version of patch proposes much smaller change than the previous one.
Take. Sorry for the delay. Staged at https://reviews.freebsd.org/D23734 A commit references this bug: Author: hrs Date: Thu Feb 27 19:40:29 UTC 2020 New revision: 358404 URL: https://svnweb.freebsd.org/changeset/base/358404 Log: Fix broken STARTTLS when SharedMemoryKey is enabled. OpenSSL 1.1 API patch for sendmail had a bug which prevented sm_RSA_generate_key() function from working. This function is used to generate a temporary RSA key for a shared memory region used for TLS processing. Note that 12.0 and 12.1-RELEASE include this bug. This affects only if SM_CONF_SHM compile-time option (enabled by default) and SharedMemoryKey run-time option (not enabled by default) in a .cf file are specified. The latter corresponds to confSHARED_MEMORY_KEY in a .mc file. PR: 242861 MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D23734 Changes: head/contrib/sendmail/src/tls.c A commit references this bug: Author: hrs Date: Wed Mar 18 18:21:59 UTC 2020 New revision: 359081 URL: https://svnweb.freebsd.org/changeset/base/359081 Log: MFC of r358404, r358410, r358412, and r358413: Fix broken STARTTLS when SharedMemoryKey is enabled. OpenSSL 1.1 API patch for sendmail had a bug which prevented sm_RSA_generate_key() function from working. This function is used to generate a temporary RSA key for a shared memory region used for TLS processing. Note that 12.0 and 12.1-RELEASE include this bug. This affects only if SM_CONF_SHM compile-time option (enabled by default) and SharedMemoryKey run-time option (not enabled by default) in a .cf file are specified. The latter corresponds to confSHARED_MEMORY_KEY in a .mc file. Fix style inconsistencies. Do not free p and g parameters after calling DH_set0_pqg(3). PR: 242861 Differential Revision: https://reviews.freebsd.org/D23734 Changes: _U stable/12/ stable/12/contrib/sendmail/src/tls.c |