Skip to content

check stored digest length before comparing authenticode digests - #2234

Merged
plusvic merged 1 commit into
VirusTotal:masterfrom
jmestwa-coder:authenticode-digest-length
Jul 28, 2026
Merged

plusvic merged 1 commit into
VirusTotal:masterfrom
jmestwa-coder:authenticode-digest-length

Conversation

@jmestwa-coder

@jmestwa-coder jmestwa-coder commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

the digest carried in a signature can be shorter than the digest algorithm's output size, so the memcmp in parse_authenticode and pkcs9_countersig_new reads past the stored digest; compare the lengths first, the way countersignature.c already does at its other three digest compares.

@plusvic
plusvic merged commit 605452e into VirusTotal:master Jul 28, 2026
14 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.

2 participants