You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suggested Fix:
Use the leave statement in assembly.
INFO:Detectors: MintVerifier.verifyProof(uint256[24],uint256[13]) (contracts/verifiers/MintVerifier.sol#145-1416) calls MintVerifier.verifyProof.asm_0.checkInput() (contracts/verifiers/MintVerifier.sol#224-231) which halt the execution return(uint256,uint256)(0,0x20) (contracts/verifiers/MintVerifier.sol#220) MintVerifier.verifyProof(uint256[24],uint256[13]) (contracts/verifiers/MintVerifier.sol#145-1416) calls MintVerifier.verifyProof.asm_0.calculateD() (contracts/verifiers/MintVerifier.sol#1241-1328) which halt the execution return(uint256,uint256)(0,0x20) (contracts/verifiers/MintVerifier.sol#1208) MintVerifier.verifyProof(uint256[24],uint256[13]) (contracts/verifiers/MintVerifier.sol#145-1416) calls MintVerifier.verifyProof.asm_0.calculateF() (contracts/verifiers/MintVerifier.sol#1330-1339) which halt the execution return(uint256,uint256)(0,0x20) (contracts/verifiers/MintVerifier.sol#1208) MintVerifier.verifyProof(uint256[24],uint256[13]) (contracts/verifiers/MintVerifier.sol#145-1416) calls MintVerifier.verifyProof.asm_0.calculateE() (contracts/verifiers/MintVerifier.sol#1341-1352) which halt the execution return(uint256,uint256)(0,0x20) (contracts/verifiers/MintVerifier.sol#1233) MintVerifier.verifyProof(uint256[24],uint256[13]) (contracts/verifiers/MintVerifier.sol#145-1416) calls MintVerifier.verifyProof.asm_0.checkPairing() (contracts/verifiers/MintVerifier.sol#1354-1396) which halt the execution return(uint256,uint256)(0,0x20) (contracts/verifiers/MintVerifier.sol#1167) MintVerifier.verifyProof.asm_0.checkInput() (contracts/verifiers/MintVerifier.sol#224-231) calls MintVerifier.verifyProof.asm_0.checkField() (contracts/verifiers/MintVerifier.sol#217-222) which halt the execution return(uint256,uint256)(0,0x20) (contracts/verifiers/MintVerifier.sol#220) MintVerifier.verifyProof.asm_0.calculateD() (contracts/verifiers/MintVerifier.sol#1241-1328) calls MintVerifier.verifyProof.asm_0.g1_mulAccC() (contracts/verifiers/MintVerifier.sol#1197-1220) which halt the execution return(uint256,uint256)(0,0x20) (contracts/verifiers/MintVerifier.sol#1208) MintVerifier.verifyProof.asm_0.calculateD() (contracts/verifiers/MintVerifier.sol#1241-1328) calls MintVerifier.verifyProof.asm_0.g1_mulSet() (contracts/verifiers/MintVerifier.sol#1237-1239) which halt the execution return(uint256,uint256)(0,0x20) (contracts/verifiers/MintVerifier.sol#1233) MintVerifier.verifyProof.asm_0.calculateD() (contracts/verifiers/MintVerifier.sol#1241-1328) calls MintVerifier.verifyProof.asm_0.g1_mulSetC() (contracts/verifiers/MintVerifier.sol#1222-1235) which halt the execution return(uint256,uint256)(0,0x20) (contracts/verifiers/MintVerifier.sol#1233) MintVerifier.verifyProof.asm_0.calculateD() (contracts/verifiers/MintVerifier.sol#1241-1328) calls MintVerifier.verifyProof.asm_0.g1_acc() (contracts/verifiers/MintVerifier.sol#1156-1169) which halt the execution return(uint256,uint256)(0,0x20) (contracts/verifiers/MintVerifier.sol#1167) MintVerifier.verifyProof.asm_0.calculateF() (contracts/verifiers/MintVerifier.sol#1330-1339) calls MintVerifier.verifyProof.asm_0.g1_mulAccC() (contracts/verifiers/MintVerifier.sol#1197-1220) which halt the execution return(uint256,uint256)(0,0x20) (contracts/verifiers/MintVerifier.sol#1208) MintVerifier.verifyProof.asm_0.checkPairing() (contracts/verifiers/MintVerifier.sol#1354-1396) calls MintVerifier.verifyProof.asm_0.g1_mulSet() (contracts/verifiers/MintVerifier.sol#1237-1239) which halt the execution return(uint256,uint256)(0,0x20) (contracts/verifiers/MintVerifier.sol#1233) MintVerifier.verifyProof.asm_0.checkPairing() (contracts/verifiers/MintVerifier.sol#1354-1396) calls MintVerifier.verifyProof.asm_0.g1_acc() (contracts/verifiers/MintVerifier.sol#1156-1169) which halt the execution return(uint256,uint256)(0,0x20) (contracts/verifiers/MintVerifier.sol#1167) Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-return-in-assembly
The text was updated successfully, but these errors were encountered:
Solidity Verifier generated using snark.js when scanned with Slither v0.10.4 shows high vulnerabilities for assembly return.
https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-return-in-assembly
Suggested Fix:
Use the
leave
statement in assembly.INFO:Detectors: MintVerifier.verifyProof(uint256[24],uint256[13]) (contracts/verifiers/MintVerifier.sol#145-1416) calls MintVerifier.verifyProof.asm_0.checkInput() (contracts/verifiers/MintVerifier.sol#224-231) which halt the execution return(uint256,uint256)(0,0x20) (contracts/verifiers/MintVerifier.sol#220) MintVerifier.verifyProof(uint256[24],uint256[13]) (contracts/verifiers/MintVerifier.sol#145-1416) calls MintVerifier.verifyProof.asm_0.calculateD() (contracts/verifiers/MintVerifier.sol#1241-1328) which halt the execution return(uint256,uint256)(0,0x20) (contracts/verifiers/MintVerifier.sol#1208) MintVerifier.verifyProof(uint256[24],uint256[13]) (contracts/verifiers/MintVerifier.sol#145-1416) calls MintVerifier.verifyProof.asm_0.calculateF() (contracts/verifiers/MintVerifier.sol#1330-1339) which halt the execution return(uint256,uint256)(0,0x20) (contracts/verifiers/MintVerifier.sol#1208) MintVerifier.verifyProof(uint256[24],uint256[13]) (contracts/verifiers/MintVerifier.sol#145-1416) calls MintVerifier.verifyProof.asm_0.calculateE() (contracts/verifiers/MintVerifier.sol#1341-1352) which halt the execution return(uint256,uint256)(0,0x20) (contracts/verifiers/MintVerifier.sol#1233) MintVerifier.verifyProof(uint256[24],uint256[13]) (contracts/verifiers/MintVerifier.sol#145-1416) calls MintVerifier.verifyProof.asm_0.checkPairing() (contracts/verifiers/MintVerifier.sol#1354-1396) which halt the execution return(uint256,uint256)(0,0x20) (contracts/verifiers/MintVerifier.sol#1167) MintVerifier.verifyProof.asm_0.checkInput() (contracts/verifiers/MintVerifier.sol#224-231) calls MintVerifier.verifyProof.asm_0.checkField() (contracts/verifiers/MintVerifier.sol#217-222) which halt the execution return(uint256,uint256)(0,0x20) (contracts/verifiers/MintVerifier.sol#220) MintVerifier.verifyProof.asm_0.calculateD() (contracts/verifiers/MintVerifier.sol#1241-1328) calls MintVerifier.verifyProof.asm_0.g1_mulAccC() (contracts/verifiers/MintVerifier.sol#1197-1220) which halt the execution return(uint256,uint256)(0,0x20) (contracts/verifiers/MintVerifier.sol#1208) MintVerifier.verifyProof.asm_0.calculateD() (contracts/verifiers/MintVerifier.sol#1241-1328) calls MintVerifier.verifyProof.asm_0.g1_mulSet() (contracts/verifiers/MintVerifier.sol#1237-1239) which halt the execution return(uint256,uint256)(0,0x20) (contracts/verifiers/MintVerifier.sol#1233) MintVerifier.verifyProof.asm_0.calculateD() (contracts/verifiers/MintVerifier.sol#1241-1328) calls MintVerifier.verifyProof.asm_0.g1_mulSetC() (contracts/verifiers/MintVerifier.sol#1222-1235) which halt the execution return(uint256,uint256)(0,0x20) (contracts/verifiers/MintVerifier.sol#1233) MintVerifier.verifyProof.asm_0.calculateD() (contracts/verifiers/MintVerifier.sol#1241-1328) calls MintVerifier.verifyProof.asm_0.g1_acc() (contracts/verifiers/MintVerifier.sol#1156-1169) which halt the execution return(uint256,uint256)(0,0x20) (contracts/verifiers/MintVerifier.sol#1167) MintVerifier.verifyProof.asm_0.calculateF() (contracts/verifiers/MintVerifier.sol#1330-1339) calls MintVerifier.verifyProof.asm_0.g1_mulAccC() (contracts/verifiers/MintVerifier.sol#1197-1220) which halt the execution return(uint256,uint256)(0,0x20) (contracts/verifiers/MintVerifier.sol#1208) MintVerifier.verifyProof.asm_0.checkPairing() (contracts/verifiers/MintVerifier.sol#1354-1396) calls MintVerifier.verifyProof.asm_0.g1_mulSet() (contracts/verifiers/MintVerifier.sol#1237-1239) which halt the execution return(uint256,uint256)(0,0x20) (contracts/verifiers/MintVerifier.sol#1233) MintVerifier.verifyProof.asm_0.checkPairing() (contracts/verifiers/MintVerifier.sol#1354-1396) calls MintVerifier.verifyProof.asm_0.g1_acc() (contracts/verifiers/MintVerifier.sol#1156-1169) which halt the execution return(uint256,uint256)(0,0x20) (contracts/verifiers/MintVerifier.sol#1167) Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-return-in-assembly
The text was updated successfully, but these errors were encountered: