Skip to content

Conversation

@Frauschi
Copy link
Contributor

For DMA buffer cleanup using wh_Client_DmaProcessClientAddress(), the size of the buffer is required. In many places on the client side, the size stored in the request message is used during the cleanup call. However, the request is overwritten when reading the response from the server (as they share the underlying buffer), potentially overwriting the stored size parameters. When the size passed to the cleanup is incorrectly overwritten with zero, the cleanup method is exited early, potentially causing a memory leak.

This problem has been identified while reworking the AES DMA operations for #282.

For DMA buffer cleanup using wh_Client_DmaProcessClientAddress(), the
size of the buffer is required. In many places, the size stored in the
request message is used during the cleanup call. However, the request is
overwritten when reading the response from the server, potentially
overwriting the stored size parameters. When the size passed to the
cleanup is incorrectly overwritten with zero, the method is exited
early, potentially causing a memory leak.
@AlexLanzano AlexLanzano merged commit 5273e1c into wolfSSL:main Feb 10, 2026
51 checks passed
@Frauschi Frauschi deleted the dma_fixes branch February 10, 2026 19:46
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