Skip to content

esp: use hash array in esp_transport_wrap icv calculation.#99

Merged
danielinux merged 1 commit intowolfSSL:masterfrom
philljj:f_2021
Apr 10, 2026
Merged

esp: use hash array in esp_transport_wrap icv calculation.#99
danielinux merged 1 commit intowolfSSL:masterfrom
philljj:f_2021

Conversation

@philljj
Copy link
Copy Markdown
Contributor

@philljj philljj commented Apr 10, 2026

Description

Use a dedicated hash array for calculating icv in esp_transport_wrap, instead of writing icv in place. Then copy truncated size to ip data buffer.

The buffer is sized for esp_sa->icv_len which might be truncated and not have room for full hash.

Fixes F-2021.

@philljj philljj self-assigned this Apr 10, 2026
Copilot AI review requested due to automatic review settings April 10, 2026 14:37
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Improves ESP transport-mode packet wrapping by avoiding in-place HMAC ICV calculation when the configured ICV length is truncated, preventing writes beyond the ICV field in the packet buffer.

Changes:

  • Compute HMAC into a dedicated full-size hash buffer in esp_transport_wrap, then copy only esp_sa->icv_len bytes into the packet’s ICV field.
  • Add more detailed logging on ICV verification failures in esp_transport_unwrap.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@philljj philljj requested a review from danielinux April 10, 2026 14:47
@philljj philljj assigned danielinux and unassigned philljj Apr 10, 2026
@danielinux danielinux merged commit 26dc833 into wolfSSL:master Apr 10, 2026
32 checks passed
@philljj philljj deleted the f_2021 branch April 10, 2026 18:44
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.

3 participants