Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Taiger4526 - _countValidSignatures Fails if signatureSplit Method is Not Implemented #55

Open
sherlock-admin4 opened this issue Nov 23, 2024 · 0 comments

Comments

@sherlock-admin4
Copy link
Contributor

sherlock-admin4 commented Nov 23, 2024

Taiger4526

Medium

_countValidSignatures Fails if signatureSplit Method is Not Implemented

Summary

The _countValidSignatures method in the HatsSignerGate contract relies on the signatureSplit method to parse signatures. If signatureSplit is not properly implemented or invoked, signature validation will fail, rendering the process incomplete.

Root Cause

https://github.com/sherlock-audit/2024-11-hats-protocol/blob/main/hats-zodiac/src/HatsSignerGate.sol#L657

The signatureSplit method, called within _countValidSignatures, is neither implemented in the contract nor imported from an external library. This omission causes the signature parsing to fail, preventing the _countValidSignatures method from executing successfully.

Internal pre-conditions

The contract calls the _countValidSignatures method.
The signatureSplit method is undefined or not imported, causing a failure.
The signatures array contains signatures to be parsed.

External pre-conditions

No specific external conditions are required; the failure entirely depends on the contract's implementation.

Attack Path

Call functions like checkTransaction that rely on the _countValidSignatures method.
Since signatureSplit is not implemented, _countValidSignatures fails during signature parsing and throws an error.
Signature validation cannot proceed, resulting in valid transactions failing to pass verification or other dependent logic breaking.

Impact

Affected Party: Signature validation logic in the HatsSignerGate contract

The failure of signature parsing prevents correct validation of legitimate signatures.
Other functionalities relying on this validation logic may also be disrupted, causing transactions to fail.

PoC

No response

Mitigation

Ensure the signatureSplit method is correctly implemented within the contract or imported from a verified external library.

@sherlock-admin2 sherlock-admin2 changed the title Dizzy Tan Parakeet - _countValidSignatures Fails if signatureSplit Method is Not Implemented Taiger4526 - _countValidSignatures Fails if signatureSplit Method is Not Implemented Nov 27, 2024
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

No branches or pull requests

1 participant