Skip to content

Fix dataASN null pointer dereference in asn.c.#7270

Merged
douzzer merged 1 commit intowolfSSL:masterfrom
philljj:zd17560
Mar 1, 2024
Merged

Fix dataASN null pointer dereference in asn.c.#7270
douzzer merged 1 commit intowolfSSL:masterfrom
philljj:zd17560

Conversation

@philljj
Copy link
Copy Markdown
Contributor

@philljj philljj commented Feb 23, 2024

Description

Several issues:

  • In smallstack build CALLOC_ASNSETDATA can fail and set ret=MEMORY_E. Check ret before attempting to deref null dataASN.
  • Check return value of EncodeOcspRequestExtensions before attempting to assign length.
  • Initialize sz = 0 to fix CI build warning.

Fixes zd#17560.

Testing

Reproducer in ticket.

@philljj philljj self-assigned this Feb 23, 2024
@philljj
Copy link
Copy Markdown
Contributor Author

philljj commented Feb 24, 2024

Guido found additional issues, needs more work.

@philljj
Copy link
Copy Markdown
Contributor Author

philljj commented Feb 28, 2024

Retest this please

@philljj
Copy link
Copy Markdown
Contributor Author

philljj commented Feb 28, 2024

Guido confirmed fixed.

@philljj philljj assigned wolfSSL-Bot and unassigned philljj Feb 28, 2024
@douzzer douzzer merged commit 67d4019 into wolfSSL:master Mar 1, 2024
@philljj philljj deleted the zd17560 branch March 1, 2024 16:30
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.

4 participants