Bug 841511 - Diffie-Hellman Groups DH24 Implementation Issue
Diffie-Hellman Groups DH24 Implementation Issue
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: openswan (Show other bugs)
6.3
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Paul Wouters
BaseOS QE Security Team
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-19 05:10 EDT by Ondrej Moriš
Modified: 2015-11-30 12:03 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-22 15:44:25 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ondrej Moriš 2012-07-19 05:10:48 EDT
Description of problem:

When ike is set to use DH22 (eg. 3des-sha1-dh22) or DH23, on both
sides of the connection I see "calc_dh_shared(): time elapsed
(OAKLEY_GROUP_DH22)" and "calc_dh_shared(): time elapsed
(OAKLEY_GROUP_DH23)", respectively.

On the other hand whenever I set ike to use DH24, I correctly see
"calc_dh_shared(): time elapsed (OAKLEY_GROUP_DH24)" on both initiator
and responder, but there is also incorrect "calc_dh_shared(): time
elapsed (OAKLEY_GROUP_DH23)" in the responder log... which is really
confusing for me (nevertheless, connection works fine). I am attaching
responder's pluto.log (with ALL debug).

Configuration is as follows:

[initiator]
conn test
 authby=secret
 type=transport
 left=<INITIATOR>
 right=<RESPONDER>
 phase2=esp
 ike=3des-sha1-dh24
 auto=add

[responder]
conn test
 authby=secret
 type=transport
 left=<INITIATOR>
 right=<RESPONDER>
 phase2=esp
 ike=3des-sha1-dh24
 auto=add

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

openswan-2.6.32-18.el6_3

How reproducible:

100%

Steps to Reproduce:

1. Set aforementioned configuration for initiator and responder.
2. Initiator: ipsec auto --up test 
3. See responder's /var/log/pluto.log.
  
Actual results:

...
calc_dh_shared(): time elapsed (OAKLEY_GROUP_DH23)
...
calc_dh_shared(): time elapsed (OAKLEY_GROUP_DH24)
...

Expected results:

...
calc_dh_shared(): time elapsed (OAKLEY_GROUP_DH24)
...

Additional info:

This might be connected to Bug 584987 or Bug 568355.
Comment 1 Avesh Agarwal 2012-07-24 15:02:17 EDT
I tested this between 2 openswan VMs using various combination of dh22/23/24 and 3des/aes  and sha1/sha2 but did not notice any such issues in the log files. Could you please attach the logs or give access to the mchines your are using.
Comment 2 RHEL Product and Program Management 2012-09-07 01:22:57 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.
Comment 3 Paul Wouters 2014-03-24 20:06:34 EDT
It's definitely not a problem in openswan-2.6.32-27.3 or libreswan upstream git

build@bofh:~/libreswan/testing/pluto/algo-pluto-11/OUTPUT (master *)$ grep calc west.pluto.log
| main inR1_outI2: calculated ke+nonce, sending I2
| calc_dh_shared(): time elapsed (OAKLEY_GROUP_DH24): 820 usec
| main inR2_outI3: calculated DH, sending R1
| quick outI1: calculated ke+nonce, sending I1
| calc_dh_shared(): time elapsed (OAKLEY_GROUP_DH24): 745 usec
| quick inI1_outR1: calculated ke+nonce, calculating DH

grep calc_dh_shared /tmp/pluto.log
build@bofh:~/libreswan/testing/pluto/algo-pluto-11/OUTPUT (master *)$ grep calc east.pluto.log 
| main inI2_outR2: calculated ke+nonce, sending R2
| main inI2_outR2: starting async DH calculation (group=24)
| calc_dh_shared(): time elapsed (OAKLEY_GROUP_DH24): 855 usec
| main inI2_outR2: calculated DH finished
| quick inI1_outR1: calculated ke+nonce, calculating DH
| calc_dh_shared(): time elapsed (OAKLEY_GROUP_DH24): 729 usec
| quick inI1_outR1: calculated DH, sending R1

I tried with both specifying ike= and esp= and with only specifying ike=
Comment 4 Paul Wouters 2014-06-22 15:44:25 EDT
I can no longer reproduce this in 2.6.32-28:

 grep calc_dh_shared /tmp/pluto.log 
| calc_dh_shared(): time elapsed (OAKLEY_GROUP_DH24): 2043 usec
| calc_dh_shared(): time elapsed (OAKLEY_GROUP_DH24): 1132 usec

(note you see two because the modp group negotiated with phase1 is re-used for phase2)


this must have been fixed between 2.6.32-18 and 2.6.32-28, although I don't see anything obvious when grepping through all the patches.

It was also already working fine in 2.6.32-25, so I'm closing this with current-release.

Note You need to log in before you can comment on or make changes to this bug.