# Casting overflow in EigenPodManager::removeDepositShares() causes operators to participate with no backing ETH

uint256-to-int256 cast overflow in EigenPodManager::removeDepositShares lets a staker inflate podOwnerDepositShares to trillions, enabling unbacked operator participation and risk-free AVS attacks.

- Payout: Contest reward
- Severity: high
- Program: Eigenlayer
- Credited: Hunter
- Disclosed: 2025-07-08
- Write-up quality: 7/10
- Original: https://cdn.cantina.xyz/reports/cantina_competition_eigenlayer_mar2025.pdf#3.1.1
- Library page: https://bugbountylibrary.com/r/cantina%3Aeigenlayer_mar2025%3A3.1.1
- Tags: domain:web3 impact:funds-loss impact:integrity kind:contest platform:cantina sev:high tech:evm tech:solidity technique:source-review vuln:accounting-error vuln:business-logic

**Target:** EigenPodManager / DelegationManager withdrawal queueing (Solidity contracts)
**Root cause:** EigenPodManager tracks podOwnerDepositShares as int256 but casts the uint256 depositSharesToRemove without bounds checking; amounts above type(int256).max wrap negative, and subtracting a negative yields a huge positive share balance.
**Steps:**
1. Set staker's podOwnerDepositShares to 32e18 via eigenPodManagerMock.setPodOwnerShares.
2. Build QueuedWithdrawalParams with strategies=[beaconChainETHStrategy] and depositShares = uint256(type(int256).max) + 35e18.
3. Call delegationManager.queueWithdrawals(params) as the staker.
4. Observe podOwnerDepositShares now far exceeds initial shares (overflow to huge positive).
5. Call registerAsOperator() (staker must not be delegated) to become an operator backed by the inflated shares.
**How found:** Noticed EigenPodManager uses int256 while other strategy managers use uint256, and that DelegationManager assumes arithmetic overflow reverts; traced the unsafe int256(depositSharesToRemove) cast in removeDepositShares and reasoned that negating an overflowed negative yields a large positive.
**Exploitation:** Attacker queues a withdrawal exceeding int256.max, overflowing the int256 cast so the subtraction of a negative inflates their podOwnerDepositShares to trillions. They never complete the withdrawal (blocked by _addShares negative check and withdrawer-only completion), keeping the fake shares in storage. They then register as an operator and use the unbacked shares for voting power and AVS participation, immune to slashing since no real ETH backs them.
**Escalation:** Inflated shares grant outsized voting power and let the operator perform malicious AVS activity with no slashing risk.
**Insight:** When one component in a system tracks balances as int256 while siblings use uint256, audit every cast between them and check whether downstream code relies on overflow reverting—signed/unsigned mismatches silently bypass those assumptions.
