Bug 1882178 - crypto-policies: invalid DH key size of 1023 bits for LEGACY
Summary: crypto-policies: invalid DH key size of 1023 bits for LEGACY
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: crypto-policies
Version: 8.3
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 8.5
Assignee: Alexander Sosedkin
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks: 1882168 1882185 1883312
TreeView+ depends on / blocked
 
Reported: 2020-09-24 01:26 UTC by zzambers
Modified: 2021-09-06 16:30 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)

Description zzambers 2020-09-24 01:26:47 UTC
LEGACY crypto policy sets jdk.tls.ephemeralDHKeySize to 1023, which is invalid and would throw exception if it was actually used [1].

Also DH keySize < 1023 in jdk.tls.disabledAlgorithms property seems weird, if key size of 1023 does not make sense. (Is there reason for that?). Btw. RHEL-8 page about crypto says < 1024 are disabled [2].

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1882168#c1
[2] https://access.redhat.com/articles/3642912

Comment 1 zzambers 2020-09-24 01:36:12 UTC
Also value of jdk.tls.ephemeralDHKeySize=0 in "EMPTY" would be invalid.

Comment 2 Tomas Mraz 2020-09-24 06:18:12 UTC
The 1023 value was used because there were historically some servers on the public web that actually had 1023 bit DH parameters. Other crypto libraries supported by crypto-policies accept this value. I believe we can change it now to 1024.

The EMPTY policy is not that interesting, it is there just for internal testing purposes of the crypto-policies config generators, but we can also adjust the generator to not emit anything if the value is 0.

As for the issue of the value not being applied, ideally someone who has knowledge of the java configuration should submit a PR to the upstream crypto-policies repository on gitlab fixing those issues.

Comment 3 zzambers 2020-09-24 12:10:47 UTC
(In reply to Tomas Mraz from comment #2)
> The 1023 value was used because there were historically some servers on the
> public web that actually had 1023 bit DH parameters. Other crypto libraries
> supported by crypto-policies accept this value. I believe we can change it
> now to 1024.
> 
> The EMPTY policy is not that interesting, it is there just for internal
> testing purposes of the crypto-policies config generators, but we can also
> adjust the generator to not emit anything if the value is 0.
> 

thank you for explanation

> As for the issue of the value not being applied, ideally someone who has
> knowledge of the java configuration should submit a PR to the upstream
> crypto-policies repository on gitlab fixing those issues.

I think this is something, that can only be fixed in openjdk package. [1]
From what I know properties from crypto policy file end-up in security
properties but this one should end up in System properties instead.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1702356

Comment 5 Andrew John Hughes 2020-09-28 18:15:20 UTC
(In reply to Tomas Mraz from comment #2)
> The 1023 value was used because there were historically some servers on the
> public web that actually had 1023 bit DH parameters. Other crypto libraries
> supported by crypto-policies accept this value. I believe we can change it
> now to 1024.
> 
> The EMPTY policy is not that interesting, it is there just for internal
> testing purposes of the crypto-policies config generators, but we can also
> adjust the generator to not emit anything if the value is 0.
> 
> As for the issue of the value not being applied, ideally someone who has
> knowledge of the java configuration should submit a PR to the upstream
> crypto-policies repository on gitlab fixing those issues.

We can add support for handling system properties, but we first need these to be separated in the crypto-policies package. See bug 1883312.


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