Skip to content

Comments

backport PR 14749 to 1.1.1 (psk and key_share compliance fixes)#15252

Closed
kaduk wants to merge 4 commits intoOpenSSL_1_1_1-stablefrom
pr14749
Closed

backport PR 14749 to 1.1.1 (psk and key_share compliance fixes)#15252
kaduk wants to merge 4 commits intoOpenSSL_1_1_1-stablefrom
pr14749

Conversation

@kaduk
Copy link
Contributor

@kaduk kaduk commented May 12, 2021

See #14749 for full description.

Needed to adapt to four-argument SSLfinal() and corresponding make update bits. (This is not actually all the changes that make update wants to make, but just the relevant ones.)

@kaduk kaduk added branch: 1.1.1 Applies to OpenSSL_1_1_1-stable branch (EOL) approval: otc review pending labels May 12, 2021
@t8m t8m added approval: done This pull request has the required number of approvals and removed approval: otc review pending labels May 12, 2021
@openssl-machine openssl-machine deleted the pr14749 branch May 12, 2021 22:08
@kaduk
Copy link
Contributor Author

kaduk commented May 12, 2021

I think openssl-machine got confused about a line in the cherry-picked commit messages??

@kaduk kaduk restored the pr14749 branch May 12, 2021 22:38
@kaduk kaduk reopened this May 12, 2021
kaduk added 4 commits May 12, 2021 15:39
It's a MUST-level requirement that if the client sends a pre_shared_key
extension not accompanied by a psk_key_exchange_modes extension, the
server must abort the handshake.  Prior to this commit the server
would continue on.

(cherry picked from commit efe0f31)
TLS 1.3 allows for the "psk_ke" and "psk_dhe_ke" key-exchange modes.
Only the latter mode introduces a new ephemeral (Diffie-Hellman)
key exchange, with the PSK being the only key material used in the
former case.

It's a compliance requirement of RFC 8446 that the server MUST NOT
send a KeyShareEntry when using the "psk_ke" mode, but prior to
this commit we would send a key-share based solely on whether the
client sent one.  This bug goes unnoticed in our internal test suite
since openssl communicating with openssl can never negotiate the
PSK-only key-exchange mode.  However, we should still be compliant
with the spec, so check whether the DHE mode was offered and don't
send a key-share if it wasn't.

(cherry picked from commit e776858)
One of the scenarios constructed in these tests was erroneously
producing successful handshakes until the previous commits, but should
have been failing.  Update our expected behavior to match the
specification requirements, and adjust the commentary slightly for
a test case relevant for the other preceding commit.

(cherry picked from commit 80c2561)
@kaduk
Copy link
Contributor Author

kaduk commented May 12, 2021

I renamed my pr14749 branch to pr14749-orig and force-pushed a rebased version that removed the "reviewed-by" and "merged from" lines, to try to forestall the machine getting confused again. I don't expect reapproval to be necessary, but I also don't mind waiting longer if needed.

@openssl-machine openssl-machine deleted the pr14749 branch May 12, 2021 23:53
@kaduk kaduk restored the pr14749 branch May 12, 2021 23:58
@kaduk
Copy link
Contributor Author

kaduk commented May 13, 2021

Oh, I see what's wrong; I'm pushing to the "wrong" github repo. Sigh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval: done This pull request has the required number of approvals branch: 1.1.1 Applies to OpenSSL_1_1_1-stable branch (EOL)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants