Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not match RFC 5114 groups without q as it is significant #14189

Closed
wants to merge 1 commit into from

Conversation

t8m
Copy link
Member

@t8m t8m commented Feb 15, 2021

This should fix the no-caching build failure on master.

@t8m t8m added branch: master Merge to master branch approval: review pending This pull request needs review by a committer severity: urgent Fixes an urgent issue (exempt from 24h grace period) labels Feb 15, 2021
@paulidale paulidale added approval: ready to merge The 24 hour grace period has passed, ready to merge and removed approval: review pending This pull request needs review by a committer labels Feb 15, 2021
@paulidale
Copy link
Contributor

Repo is frozen which prevents merging.

@slontis
Copy link
Member

slontis commented Feb 15, 2021

I am happy for this to go in to fix the build, but it is really ignoring the original problem...
i.e the decoder was doing something different to the import/export.

I do not see why if you have a p and g that match RFC5114 you would not be able to fill in the q.
If you were using this in an exchange and the q was not provided then wouldnt it make sense to be able to fill it in.
For ffdhe this is actually required in TLS as it only transmits p,g. So the only way to validate is to assume that if there is no q then it is the named group. I dont see why the same logic does not apply to any dh named group?

@t8m
Copy link
Member Author

t8m commented Feb 16, 2021

In the first place I'd like to see the RFC5114 groups to die completely.

@slontis
Copy link
Member

slontis commented Feb 16, 2021

Yep I agree, but backwards compatibility is still there..

I have a PR coming with a one liner to fix the decoding issue..

basically a single call to

dh_cache_named_group(dh);

is required inside dh_cb() in dh_asn1.c

The dhx one calls set0_pqg() which sets the nid if it is a named group..
The dh one (where the ASN1 only contains p & g) doesnt set the nid..

So this was one of the case(s) where building q if you have p & g is correct.

@mattcaswell
Copy link
Member

Pushed.

openssl-machine pushed a commit that referenced this pull request Feb 16, 2021
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from #14189)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approval: ready to merge The 24 hour grace period has passed, ready to merge branch: master Merge to master branch severity: urgent Fixes an urgent issue (exempt from 24h grace period)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants