-
Notifications
You must be signed in to change notification settings - Fork 51
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
SSL_clear do not reset the state of the QUIC members #55
Comments
TBH, I usually don't recommend re-using |
I'm working on this, but it's non-trivial, as |
Fixes #55 Had to fixup tests because SSL_accept() eventually calls SSL_clear() and it was removing the inital ClientHello sent via SSL_provide_quic_data() from the server SSL.
Fixes #55 Had to fixup tests because SSL_accept() eventually calls SSL_clear() and it was removing the inital ClientHello sent via SSL_provide_quic_data() from the server SSL.
Yes, this call to |
That sounds pretty annoying to me. I haven't updated MsQuic to the latest that includes this, because we didn't need it (as far as I could tell), but I would be a bit annoyed if I had to do this if/when a new security patch comes out and I updated to get the fixes and this breaks. |
So, my first comment was that "I usually don't recommend re-using In the case of the unit tests, the Fundamentally, if the QUIC data is received before So, I see a number of options
I'm leaning toward 2 or 3. |
Like @tatsuhiro-t, we had to change our code to do a dummy I'd be leaning toward 2, as it looks to me that
Do you know if BoringSSL has a working |
I did note that line in |
AFAICT, BoringSSL does not call This is what BoringSSL does for
Which is basically freeing the SSL and then newing it. |
For those who are experiencing problems, is it on 1.1.1 or 3.0? (i.e. which one should should I try an initial patch for?) |
I found this issue with 3.0.0, but I can pin dependency down to the working revision, so either is fine. |
We are using 1.1.1, but if your solution works fine for @tatsuhiro-t, it should work fine for us too. We are using ngtcp2, but with a custom crypto layer, also based on OpenSSL. |
I pushed a new fix for 1.1.1 (#61) and 3.0 (#62). Could someone (@tatsuhiro-t ?) see if it works better for them? |
@tmshort I can't right now, but if you ever want to run a 1.1.1 change through the (quite extensive) MsQuic automated CI, simply make a draft PR to MsQuic with an updated submodule and I'll approve the CI run. It should give you coverage on Linux, Windows, and macOS; functional, stress and performance. We can let it run to get the results and then close the PR afterwards. |
Thanks @nibanks: microsoft/msquic#2104 |
@tmshort Tested your changes with 1.1.1 and I could remove the |
The fix works for me. Thank you! |
Fixes #55 Had to fixup tests because SSL_accept() eventually calls SSL_clear() and it was removing the inital ClientHello sent via SSL_provide_quic_data() from the server SSL.
Fixes #55 Had to fixup tests because SSL_accept() eventually calls SSL_clear() and it was removing the inital ClientHello sent via SSL_provide_quic_data() from the server SSL.
Fixes #55 Had to fixup tests because SSL_accept() eventually calls SSL_clear() and it was removing the inital ClientHello sent via SSL_provide_quic_data() from the server SSL.
Fixes #55 Had to fixup tests because SSL_accept() eventually calls SSL_clear() and it was removing the inital ClientHello sent via SSL_provide_quic_data() from the server SSL.
Fixes #55 Had to fixup tests because SSL_accept() eventually calls SSL_clear() and it was removing the inital ClientHello sent via SSL_provide_quic_data() from the server SSL.
Fixes #55 Had to fixup tests because SSL_accept() eventually calls SSL_clear() and it was removing the inital ClientHello sent via SSL_provide_quic_data() from the server SSL.
Fixes #55 Had to fixup tests because SSL_accept() eventually calls SSL_clear() and it was removing the inital ClientHello sent via SSL_provide_quic_data() from the server SSL.
Fixes #55 Had to fixup tests because SSL_accept() eventually calls SSL_clear() and it was removing the inital ClientHello sent via SSL_provide_quic_data() from the server SSL.
Fixes #55 Had to fixup tests because SSL_accept() eventually calls SSL_clear() and it was removing the inital ClientHello sent via SSL_provide_quic_data() from the server SSL.
Fixes #55 Had to fixup tests because SSL_accept() eventually calls SSL_clear() and it was removing the inital ClientHello sent via SSL_provide_quic_data() from the server SSL.
Fixes quictls#55 Had to fixup tests because SSL_accept() eventually calls SSL_clear() and it was removing the inital ClientHello sent via SSL_provide_quic_data() from the server SSL.
Fixes #55 Had to fixup tests because SSL_accept() eventually calls SSL_clear() and it was removing the inital ClientHello sent via SSL_provide_quic_data() from the server SSL.
Fixes #55 Had to fixup tests because SSL_accept() eventually calls SSL_clear() and it was removing the inital ClientHello sent via SSL_provide_quic_data() from the server SSL.
Fixes #55 Had to fixup tests because SSL_accept() eventually calls SSL_clear() and it was removing the inital ClientHello sent via SSL_provide_quic_data() from the server SSL.
Fixes #55 Had to fixup tests because SSL_accept() eventually calls SSL_clear() and it was removing the inital ClientHello sent via SSL_provide_quic_data() from the server SSL.
Fixes #55 Had to fixup tests because SSL_accept() eventually calls SSL_clear() and it was removing the inital ClientHello sent via SSL_provide_quic_data() from the server SSL.
Fixes #55 Had to fixup tests because SSL_accept() eventually calls SSL_clear() and it was removing the inital ClientHello sent via SSL_provide_quic_data() from the server SSL.
Fixes #55 Had to fixup tests because SSL_accept() eventually calls SSL_clear() and it was removing the inital ClientHello sent via SSL_provide_quic_data() from the server SSL.
Fixes #55 Had to fixup tests because SSL_accept() eventually calls SSL_clear() and it was removing the inital ClientHello sent via SSL_provide_quic_data() from the server SSL.
Fixes #55 Had to fixup tests because SSL_accept() eventually calls SSL_clear() and it was removing the inital ClientHello sent via SSL_provide_quic_data() from the server SSL.
Fixes quictls#55 Had to fixup tests because SSL_accept() eventually calls SSL_clear() and it was removing the inital ClientHello sent via SSL_provide_quic_data() from the server SSL.
Fixes quictls#55 Had to fixup tests because SSL_accept() eventually calls SSL_clear() and it was removing the inital ClientHello sent via SSL_provide_quic_data() from the server SSL.
Fixes quictls#55 Had to fixup tests because SSL_accept() eventually calls SSL_clear() and it was removing the inital ClientHello sent via SSL_provide_quic_data() from the server SSL.
Fixes quictls#55 Had to fixup tests because SSL_accept() eventually calls SSL_clear() and it was removing the inital ClientHello sent via SSL_provide_quic_data() from the server SSL.
Fixes quictls#55 Had to fixup tests because SSL_accept() eventually calls SSL_clear() and it was removing the inital ClientHello sent via SSL_provide_quic_data() from the server SSL.
Fixes #55 Had to fixup tests because SSL_accept() eventually calls SSL_clear() and it was removing the inital ClientHello sent via SSL_provide_quic_data() from the server SSL.
Fixes #55 Had to fixup tests because SSL_accept() eventually calls SSL_clear() and it was removing the inital ClientHello sent via SSL_provide_quic_data() from the server SSL.
Fixes #55 Had to fixup tests because SSL_accept() eventually calls SSL_clear() and it was removing the inital ClientHello sent via SSL_provide_quic_data() from the server SSL.
Fixes #55 Had to fixup tests because SSL_accept() eventually calls SSL_clear() and it was removing the inital ClientHello sent via SSL_provide_quic_data() from the server SSL.
Fixes #55 Had to fixup tests because SSL_accept() eventually calls SSL_clear() and it was removing the inital ClientHello sent via SSL_provide_quic_data() from the server SSL.
Fixes quictls#55 Had to fixup tests because SSL_accept() eventually calls SSL_clear() and it was removing the inital ClientHello sent via SSL_provide_quic_data() from the server SSL.
Fixes #55 Had to fixup tests because SSL_accept() eventually calls SSL_clear() and it was removing the inital ClientHello sent via SSL_provide_quic_data() from the server SSL.
Hello,
It looks like
SSL_clear
doesn't reset any QUIC-specific members (like thequic_read_level
/quic_write_level
). This means that it is currently impossible to re-use the sameSSL
object to re-establish another connection.I guess we should reset the following members:
quic_read_level
tossl_encryption_inititial
quic_write_level
tossl_encryption_inititial
quic_latest_level_received
tossl_encryption_inititial
quic_buf
to an empty bufferquic_input_data_head
toNULL
quic_input_data_tail
toNULL
quic_next_record_start
to0
Am I missing anything?
The text was updated successfully, but these errors were encountered: