Check this security consideration from Trail of Bits: https://github.com/crytic/building-secure-contracts/tree/master/not-so-smart-contracts/cairo/overconstrained_l1_l2_interaction
Make sure to validate that the checks on both the L1 and L2 side are similar enough to prevent unexpected behavior. Ensure that any unsymmetric validations on either side cannot lead to a tokens being trapped or any other denial of service.
The sponsor in video says auditors should focus on I quote:
"auditors should focus on serveral critical aspects first is security of the NFTs Locking Unlocking"
This link to video: https://youtu.be/vZhI-hiA_hI?t=983
A critical issue has been identified in the interaction between L1 and L2 when users set use_withdraw_auto to true.
This configuration leads to transaction reversion on L1 due to an overconstrained check within the protocol Protocol.canUseWithdrawAuto(header)
The vulnerability stems from the overconstrained logic applied during L1 and L2 interactions, specifically when the use_withdraw_auto
flag is set to true. The Protocol.canUseWithdrawAuto(header)
function contains a check that, when the flag is set to true, leads to transaction failure on L1. resulting in failed transactions and potentially locking assets in the protocol.
POC:
If the use_withdraw_auto flag is set to true, the transaction will revert on L1 due to if (Protocol.canUseWithdrawAuto(header))
This reversion preventing them from successfully withdrawing their assets and potentially causing losses.
To mitigate this issue, users should be enforced to set use_withdraw_auto to false in their transactions.
Impact: High, token will be stuck in L2 bridge. Likelyhood: Very low, option is available in L2 but has been disabled since March on L1, would be almost a user error.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.