# EIP-1271 non-compliance and denial of service risk for account abstraction wallets in council safe

Council Safe's checkNSignatures calls isValidSignature with (bytes,bytes) instead of EIP-1271's (bytes32,bytes), so smart-contract-wallet owners can't sign and the Safe can be bricked.

- Payout: Contest reward
- Severity: medium
- Program: Optimism
- Credited: elhaj
- Disclosed: 2024-06-06
- Write-up quality: 6/10
- Original: https://cdn.cantina.xyz/reports/cantina_competition_optimism_may2024.pdf#3.1.6
- Library page: https://bugbountylibrary.com/r/cantina%3Aoptimism_may2024%3A3.1.6
- Tags: domain:web3 impact:dos kind:contest platform:cantina sev:medium tech:evm tech:solidity technique:source-review vuln:auth-bypass vuln:dos vuln:signature-replay

**Target:** Safe multisig contract (checkNSignatures / ISignatureValidator)
**Root cause:** The Safe version used by Council Safe defines ISignatureValidator.isValidSignature as (bytes,bytes) and expects magic value 0x20c13b0b, whereas EIP-1271 standard specifies (bytes32,bytes) and magic value 0x1626ba7e, so compliant smart-contract wallets return a value that fails the check.
**Steps:**
1. Identify Council Safe uses a Safe version whose ISignatureValidator interface is (bytes,bytes) with magic value `0x20c13b0b`.
2. Add an owner that is an EIP-1271-compliant smart contract wallet returning `0x1626ba7e`.
3. Attempt to collect signatures from that owner; `checkNSignatures` calls `isValidSignature(data, contractSignature)` and requires `== EIP1271_MAGIC_VALUE` (`0x20c13b0b`), which fails with `GS024`.
4. If smart-wallet owners > ownersCount - threshold, threshold can never be reached and no transaction executes.
**How found:** Code reading of checkNSignatures against the EIP-1271 spec, noticing the interface signature and magic value differ from the standard.
**Escalation:** If FALLBACK_OWNER (itself a Safe) upgrades to Safe 1.5.0+ using the correct magic value, and becomes sole owner after a shutdown, it cannot sign, fully DoSing the Council Safe.
**Insight:** When auditing multisig/signature-verification contracts, diff the implemented ISignatureValidator signature and magic constant against the EIP-1271 spec (bytes32,bytes / 0x1626ba7e); a mismatched magic value silently rejects all compliant smart-contract-wallet signers and can brick threshold logic.
