Skip to content

asn.c: guard empty otherName copy to avoid NULL memcpy (UBSan) - #11117

Merged
JacobBarthelmeh merged 1 commit into
wolfSSL:masterfrom
night1rider:fix/san-othername-null-memcpy
Aug 10, 2026
Merged

asn.c: guard empty otherName copy to avoid NULL memcpy (UBSan)#11117
JacobBarthelmeh merged 1 commit into
wolfSSL:masterfrom
night1rider:fix/san-othername-null-memcpy

Conversation

@night1rider

Copy link
Copy Markdown
Contributor

When a subjectAltName otherName has an empty value, SetDNSEntry() called XMEMCPY(dst, NULL, 0). Passing NULL to memcpy is undefined behavior and aborts under UBSan. Skip the copy unless there is real data to copy.

When a subjectAltName otherName has an empty value, SetDNSEntry() called
XMEMCPY(dst, NULL, 0). Passing NULL to memcpy is undefined behavior and
aborts under UBSan. Skip the copy unless there is real data to copy.
@night1rider night1rider self-assigned this Aug 8, 2026
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Fenrir Automated Review — PR #11117

Scan targets checked: wolfcrypt-bugs, wolfcrypt-src

No new issues found in the changed files. ✅

@JacobBarthelmeh
JacobBarthelmeh merged commit 77da939 into wolfSSL:master Aug 10, 2026
374 of 376 checks passed
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