Fix missing blacklist checks in NativeFiatTokenV2_2 authorization functions - #655
Open
Kewe63 wants to merge 4 commits into
Open
Fix missing blacklist checks in NativeFiatTokenV2_2 authorization functions#655Kewe63 wants to merge 4 commits into
Kewe63 wants to merge 4 commits into
Conversation
- Update @typechain/ethers-v6 from 0.4.3 to 0.5.1 - Update typechain from 8.3.1 to 8.3.2 - Resolves peer dependency conflicts that break project setup
This reverts commit 2c2f3a1.
…ctions Add notBlacklisted(from) and notBlacklisted(to) modifiers to all four EIP-3009 authorization functions in NativeFiatTokenV2_2 that were missing them: transferWithAuthorization (bytes signature overload), transferWithAuthorization (v,r,s overload), receiveWithAuthorization (bytes signature overload), and receiveWithAuthorization (v,r,s overload). The parent contract FiatTokenV2_2 correctly enforces blacklist checks on these functions, but NativeFiatTokenV2_2 dropped them when overriding, allowing blacklisted addresses to bypass compliance controls via EIP-3009 authorized transfers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
NativeFiatTokenV2_2was missingnotBlacklisted(from)andnotBlacklisted(to)modifiers on all four EIP-3009 authorization functions. This allowed blacklisted addresses to bypass compliance controls via authorized transfers.Problem
The parent contract
FiatTokenV2_2correctly enforces blacklist checks on these functions. However,NativeFiatTokenV2_2dropped these modifiers when overriding, creating a security vulnerability.Affected functions:
transferWithAuthorization(address,address,uint256,uint256,uint256,bytes32,bytes)transferWithAuthorization(address,address,uint256,uint256,uint256,bytes32,uint8,bytes32,bytes32)receiveWithAuthorization(address,address,uint256,uint256,uint256,bytes32,bytes)receiveWithAuthorization(address,address,uint256,uint256,uint256,bytes32,uint8,bytes32,bytes32)Fix
Added
notBlacklisted(from)andnotBlacklisted(to)modifiers to all four functions, restoring parity with the parent contractFiatTokenV2_2.Impact
Without this fix, blacklisted accounts could transfer tokens through EIP-3009 authorized transfers, completely bypassing the AML/compliance blacklist mechanism.