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

[Bug]: TLS 1.3 RFC 8446 violations #8355

Closed
hey3e opened this issue Jan 13, 2025 · 3 comments · Fixed by #8356
Closed

[Bug]: TLS 1.3 RFC 8446 violations #8355

hey3e opened this issue Jan 13, 2025 · 3 comments · Fixed by #8356
Assignees
Labels

Comments

@hey3e
Copy link

hey3e commented Jan 13, 2025

Contact Details

[email protected]

Version

5.6.3 928dd70

Description

ClientHello who lacks of "signature_algorithms" extension can still connect to examples/server/server, which violates rules in RFC8446 that "Clients which desire the server to authenticate itself via a certificate MUST send the "signature_algorithms" extension. If a server is authenticating via a certificate and the client has not sent a "signature_algorithms" extension, then the server MUST abort the handshake with a "missing_extension" alert".

Reproduction steps

  1. Use OpenSSL s_client.
  • locate ssl/statem/extensions_clnt.c
  • locate tls_construct_ctos_sig_algs function
  • delete the code of adding sig_alg extensions: if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_signature_algorithms) || !WPACKET_start_sub_packet_u16(pkt) || !WPACKET_start_sub_packet_u16(pkt) || !tls12_copy_sigalgs(s, pkt, salg, salglen) || !WPACKET_close(pkt) || !WPACKET_close(pkt)) { SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_TLS_CONSTRUCT_CTOS_SIG_ALGS, ERR_R_INTERNAL_ERROR); return EXT_RETURN_FAIL; } and make.
  1. Make wolfssl.
  2. Start server ./examples/server/server -v 4 -p 4433
  3. Start client ./apps/openssl s_client -connect 127.0.0.1:4433 -tls1_3 -cert /wolfssl/certs/client-cert.pem -key /wolfssl/certs/client-key.pem -CAfile /wolfssl/certs/ca-cert.pem
  4. Connected, which violates the RFC.

Relevant log output

No response

@hey3e hey3e added the bug label Jan 13, 2025
@kareem-wolfssl kareem-wolfssl self-assigned this Jan 13, 2025
@kareem-wolfssl
Copy link
Contributor

Hi @hey3e ,

Thank you for the report. I was unfortunately unable to get OpenSSL running but I have hacked our example client to not send sigalgs and I'm seeing the same behavior as you are, despite us having an error case to check for this in DoTls13ClientHello, it doesn't appear to be getting hit in this case. I am working on a fix for this now and will update you as I progress.

@kareem-wolfssl
Copy link
Contributor

Hi @hey3e ,

Thank you again for the report. Please give #8356 and let me know if it fixes the issue for you.

We would love to hear more about your use case. Are you able to share any information on how you found this issue? Are you using any kind of analysis tool with wolfSSL? You are welcome to reach out to us at [email protected] if these details are sensitive.

@hey3e
Copy link
Author

hey3e commented Jan 14, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants