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.
Description of problem:
A connections using authby=rsa-sha2_512 cannot be established.
Version-Release number of selected component (if applicable):
libreswan-3.29 as well as libreswan-3.32
nss-3.44 as well as nss-3.53
How reproducible:
100%
Steps to Reproduce:
1. Configure connection using authby=rsa-sha2_512
2. Initial connection from the client
Actual results:
# ipsec auto --up test-rsasig
002 "test-rsasig" #1: initiating v2 parent SA
133 "test-rsasig" #1: initiate
002 "test-rsasig": constructed local IKE proposals for test-rsasig (IKE SA initiator selecting KE): 1:IKE:ENCR=AES_GCM_C_256;PRF=HMAC_SHA2_512,HMAC_SHA2_256;INTEG=NONE;DH=MODP2048,MODP3072,MODP4096,MODP8192,ECP_256,ECP_384,ECP_521,CURVE25519 2:IKE:ENCR=AES_GCM_C_128;PRF=HMAC_SHA2_512,HMAC_SHA2_256;INTEG=NONE;DH=MODP2048,MODP3072,MODP4096,MODP8192,ECP_256,ECP_384,ECP_521,CURVE25519 3:IKE:ENCR=AES_CBC_256;PRF=HMAC_SHA2_512,HMAC_SHA2_256;INTEG=HMAC_SHA2_512_256,HMAC_SHA2_256_128;DH=MODP2048,MODP3072,MODP4096,MODP8192,ECP_256,ECP_384,ECP_521,CURVE25519 4:IKE:ENCR=AES_CBC_128;PRF=HMAC_SHA2_512,HMAC_SHA2_256;INTEG=HMAC_SHA2_512_256,HMAC_SHA2_256_128;DH=MODP2048,MODP3072,MODP4096,MODP8192,ECP_256,ECP_384,ECP_521,CURVE25519 (default)
133 "test-rsasig" #1: STATE_PARENT_I1: sent v2I1, expected v2R1
003 "test-rsasig" #1: RSA_sign_hash: sign function failed (-8189)
003 "test-rsasig" #1: DigSig: failed to find our RSA key
Connection does not work.
Expected results:
Connection works.
Additional info:
Connection works when
* authby=rsa-sha1 is used
* authby=rsa-sha2_256 is used
* authby=rsa-sha2_384 is used
Unfortunately on 3.32 for connection with authby=rsasig rsa-sha2_512 is tried first and fails and therefore authby=rsasig on 3.32 does not work anymore.
I am not sure if this is a bug in libreswan or nss. If it is nss issue and we won't fix it int 8.3 then authby=rsasig should be modified to imply rsa-sha1 again as it was in 3.29.
We realized that 1024 bit RSA keys are actually too small for SHA-512. I am changing bug summary to reflect that. Currently when authby is set to rsasig it implies usage of rsa-sha2_512, rsa-sha2_384, rsa-sha2_256, rsa-sha1. However, for RSA keys of size 1024 bits the first option in that ordering fails (correctly). Previously (in 3.29), rsasig implied rsa-sha1 only for which 1024 bits RSA keys are fine. We have to switch back to this solution to prevent issues for customers using rsasig authby setting with 1024 bit keys. If anyone wants to use SHA2, authby must be set to it explicitly (ie. authby=rsa-sha2).
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 (libreswan 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:4722