Skip to content

check signed-message length in AIMerSigner.verifySignature - #2401

Open
rootvector2 wants to merge 1 commit into
bcgit:mainfrom
rootvector2:aimer-verify-envelope-length
Open

check signed-message length in AIMerSigner.verifySignature#2401
rootvector2 wants to merge 1 commit into
bcgit:mainfrom
rootvector2:aimer-verify-envelope-length

Conversation

@rootvector2

Copy link
Copy Markdown
Contributor

AIMerSigner.verifySignature slices the signature out of the message || signature envelope at offset message.length without checking the buffer is that long, so a truncated signature throws ArrayIndexOutOfBoundsException out of Signature.verify() and a valid one with bytes appended still verifies (found by feeding wrong-length signatures to every BCPQC Signature service); it now requires exactly message.length + getSignatureBytes() and returns false otherwise, the guard the Falcon, Faest, Mayo, Snova and QRUOV signers already carry.

@dghgit dghgit self-assigned this Aug 21, 2026
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