#38505 [SC-Low] IRNode Multi-Evaluation In For List Iter
Description
Brief/Intro
Vulnerability Details
def _analyse_list_iter(self, iter_node, target_type):
# iteration over a variable or literal list
iter_val = iter_node.reduced()
if isinstance(iter_val, vy_ast.List):
len_ = len(iter_val.elements)
if len_ == 0:
raise StructureException("For loop must have at least 1 iteration", iter_node)
iter_type = SArrayT(target_type, len_)
else:
try:
iter_type = get_exact_type_from_node(iter_node)
except (InvalidType, StructureException):
raise InvalidType("Not an iterable type", iter_node)
if not isinstance(iter_type, (DArrayT, SArrayT)):
raise InvalidType("Not an iterable type", iter_node)
...Impact Details
References
Proof of Concept
Proof of Concept
Previous#38530 [SC-Low] Incorrectly Eliminated Code With Side Effect In Concat ArgsNext#38502 [BC-Low] Pending pool subtraction overflow causes node halt/shutdown
Was this helpful?