Skip to content

tls13: reject zero length session ticket, and add test. - #11114

Open
philljj wants to merge 2 commits into
wolfSSL:masterfrom
philljj:set_ticket
Open

tls13: reject zero length session ticket, and add test.#11114
philljj wants to merge 2 commits into
wolfSSL:masterfrom
philljj:set_ticket

Conversation

@philljj

@philljj philljj commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Description

  • tls13.c, DoTls13NewSessionTicket: reject a zero-length session ticket.

Testing

Added unit test:

  • test_tls13_zero_length_session_ticket
./configure --enable-tls13 --enable-session-ticket --enable-debug && make
./tests/unit.test -test_tls13_zero_length_session_ticket

@philljj philljj self-assigned this Aug 7, 2026
Copilot AI lite review requested due to automatic review settings August 7, 2026 23:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Rejects malformed TLS 1.3 NewSessionTicket messages with a zero-length ticket and adds coverage to ensure the client rejects this case.

Changes:

  • Add a TLS 1.3 unit test that injects a NewSessionTicket with ticket_length=0 and asserts the client returns BUFFER_ERROR.
  • Update TLS 1.3 ticket parsing to explicitly reject zero-length session tickets before calling SetTicket.
  • Register the new unit test in the TLS 1.3 test header/group list.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
tests/api/test_tls13.h Declares and registers test_tls13_zero_length_session_ticket.
tests/api/test_tls13.c Adds a memio-based test that injects a zero-length ticket NewSessionTicket.
src/tls13.c Adds an explicit length == 0 rejection in DoTls13NewSessionTicket.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/tls13.c
Comment thread tests/api/test_tls13.c
Comment thread tests/api/test_tls13.c
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown

MemBrowse Memory Report

gcc-arm-cortex-m0plus

  • FLASH: .text +12 B (+0.0%, 64,363 B / 262,144 B, total: 25% used)

gcc-arm-cortex-m3

  • FLASH: .text +8 B (+0.0%, 123,091 B / 262,144 B, total: 47% used)

gcc-arm-cortex-m4-openssl-compat

  • FLASH: .text +256 B (+0.0%, 775,100 B / 1,048,576 B, total: 74% used)
  • RAM: .data +8 B (+0.0%, 136,944 B / 262,144 B, total: 52% used)

gcc-arm-cortex-m4-tls12

  • FLASH: .text +64 B (+0.1%, 123,891 B / 262,144 B, total: 47% used)

linuxkm-standard

@philljj philljj assigned wolfSSL-Bot and unassigned philljj Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RFC 8446 Parse-Error Mismatch: Zero-Length NewSessionTicket.ticket Is Accepted

3 participants