Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1842844

Summary: Samba should use TLS priority lists from crypto policies
Product: Red Hat Enterprise Linux 8 Reporter: Ondrej Moriš <omoris>
Component: sambaAssignee: Andreas Schneider <asn>
Status: CLOSED ERRATA QA Contact: sssd-qe <sssd-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.2CC: abokovoy, asn, asosedki, dkarpele, dueno, gdeschner, iboukris, jarrpa
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.0   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: samba-4.12.3-6.el8.3 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-04 01:59:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1842847    

Description Ondrej Moriš 2020-06-02 07:50:45 UTC
Description of problem:

Crypto-policy non-compliance is reported by rpmlint.

Since RHEL-8.0 we have system-wide crypto policies - usage of cryptographic protocols such as TLS that are enforced system-wide. In general we want all applications in RHEL to be compliant with the crypto policy set on the system (see policy [1] inherited from Fedora).

Rpmlint detected that samba-client-libs uses SSL_CTX_set_cipher_list from OpenSSL library without  PROFILE=SYSTEM. This indicates that a custom setting is used rather than system-wide crypto-policies setting. It is not a problem as long as it is intentional (e.g. specific algorithm is requested by user or configuration). However, unintentional usage might be a potential bug.

Could you please inspect relevant parts of the code, check that this is not rpmlint false positive and verify that custom setting is used intentionally?

 * If yes, feel free to close this BZ as NOT-A-BUG.
 * If not, could you please consider using system-wide crypto policy setting (PROFILE=SYSTEM) instead of custom setting?

[1] https://docs.fedoraproject.org/en-US/packaging-guidelines/CryptoPolicies

Version-Release number of selected component (if applicable):

samba-4.11.2-13.el8

How reproducible:

100%

Steps to Reproduce:

1. rpmlint samba-client-libs-4.11.2-13.el8.x86_64.rpm


Expected results:

No crypto-policy-non-compliance warning.

Actual results:

samba-client-libs.x86_64: W: crypto-policy-non-compliance-gnutls-1 /usr/lib64/samba/libauthkrb5-samba4.so gnutls_priority_set_direct

Comment 1 Alexander Bokovoy 2020-06-02 08:05:51 UTC
The bug report is misleading. It talks about OpenSSL and functions that aren't even exist in Samba source code.

In reality, the issue is with GnuTLS gnutls_priority_set_direct() calls.

According to Fedora documentation, the following applies:

https://docs.fedoraproject.org/en-US/packaging-guidelines/CryptoPolicies/
...
GnuTLS applications:

If the application provides a configuration file that allows to modify the cipher priority string, the shipped file contains "@SYSTEM" as default. In that case no further action is required.

If the application doesn’t have a configuration file, ensure that it uses gnutls_set_default_priority(), or that the default priority string is "@SYSTEM". That is, check the source code for gnutls_priority_set_direct(), gnutls_priority_init(); if they are not present and gnutls_set_default_priority() is used, nothing needs to be done. Otherwise check the strings provided by the application. If it contains PSK or SRP do nothing (these applications are not currently covered by the default policy). If not, then replace gnutls_priority_set_direct() with gnutls_set_default_priority(). If gnutls_priority_init() is used instead with a fixed string, replace the string with "@SYSTEM".

Samba defaults to 'NORMAL:-VERS-SSL3.0' for 'tls priority' setting.

I'd suggest we change default configuration on Fedora and RHEL to use '@SYSTEM' instead.

Comment 2 Ondrej Moriš 2020-06-02 12:30:44 UTC
Thanks for clarification Alexander. Sorry about misleading description, it was generated automatically and this one gnutls application slipped to the openssl applications list. The most important is the "Actual result" part which is thankfully correct. Anyway, your analysis is perfect description of the problem, thanks.

Comment 5 Andreas Schneider 2020-06-30 15:07:15 UTC
The reality is that this doesn't seem to be working correctly in GnuTLS.

Comment 6 Andreas Schneider 2020-06-30 15:32:17 UTC
See https://gitlab.com/gnutls/gnutls/-/issues/1046

We will revert to NORMAL:-VERS-SSL3.0 which is working correctly.

Comment 7 Ondrej Moriš 2020-07-13 07:17:17 UTC
(In reply to Andreas Schneider from comment #5)
> The reality is that this doesn't seem to be working correctly in GnuTLS.

Andreas, could you be more specific? Does it mean that setting @SYSTEM does not work for samba?

Comment 8 Andreas Schneider 2020-07-14 14:39:09 UTC
Ondrej,

it doesn't work as expected as the fallbacks don't work as expected. Samba is running on other systems which are not only RHEL so we had to revert this upstream. We need GnuTLS to support this correctly first. However the code calls gnutls_set_default_priority() first now.

Comment 11 errata-xmlrpc 2020-11-04 01:59:47 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (samba bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2020:4543