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 1570600

Summary: krb5-libs uses slow crypto implementation
Product: Red Hat Enterprise Linux 7 Reporter: Heinrich Mislik <heinrich.mislik>
Component: krb5Assignee: Robbie Harwood <rharwood>
Status: CLOSED ERRATA QA Contact: Patrik Kis <pkis>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.4CC: dpal, pkis
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: krb5-1.15.1-33.el7 Doc Type: Bug Fix
Doc Text:
Cause: krb5 used its own crypto implementations more often than needed. Consequence: smbclient is slow due to inefficient sha256 implementation in krb5. Fix: Use openssl for crypto more often. Result: More performance; 50% for this use case. Additionally, when the system is in FIPS mode, krb5 will strictly enforce a FIPS-compliant cipher list.
Story Points: ---
Clone Of:
: 1570910 (view as bug list) Environment:
Last Closed: 2018-10-30 08:08:13 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: 1570910, 1599721    
Bug Blocks:    

Description Heinrich Mislik 2018-04-23 10:15:55 UTC
Description of problem:

in krb5.spec --with-crypto-impl is not specified, resulting in --with-crypto-impl=builtin. The builtin routines seem rather slow and CPU intensive. Adding --with-crypto-impl=openssl can reduce processing time by ca. 50%

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

krb5-libs-1.15.1-19.el7.x86_64

How reproducible:

One affected application is samba server joined to AD, where connection setup with kerberos is slowed down. The following was run against VMWare server with 2 CPUs.

kinit someuser@SOMEREALM
for i in `seq 1 10` ; do time smbclient //someserverinad/someshare -k -c exit & sleep .1 ; done

Load on samaba server goes up, responses take up to 8 seconds.
perf top shows excessive CPU usage by:

 17.26%  libk5crypto.so.3.1                     [.] k5_sha256_update     

After rebuilding krb5-libs with configure option --with-crypto-impl=openssl response times go down to 4 seconds.

Additional info:

openssl already is a requisite for krb5-libs, so adding this option should not have any impact.

400ms for session setup may seem not so much and under normal conditions is no problem. After a server restart or network outage Windows clients tend to reconnect rather agressive, resulting in much more then 10 connections per second (like in my test above) and having the samba server completely unresponsive for minutes.

Cheers

Heinrich

Comment 15 errata-xmlrpc 2018-10-30 08:08:13 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, 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/RHSA-2018:3071