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
Currently nested containers are validated by recursive calls to validation function (see eof-create4 branch). Subcontainers are validated before instruction validation of parent container, because CREATE3 validation requires to know whether target child container is truncated or not.
Recursion is potentially attackable by nesting containers many levels deep causing client's stack overflow. It is better to rewrite is as interation, here is a sketch of an algorithm:
worklist = queue(parent_container)
while worklist not empty:
container = worklist.dequeue()
header = validate_header(container)
subcontainer_headers = {}
for all subcontainers in header:
subcont_header = validate_header(subcontainer)
subcontainer_header.push_back(subcontainer_header)
worklist.queue(subcontainer)
validate_instructions(container, subcontainer_headers)
validate_stack(container) etc.
Essentially you need to validate child container headers before validating instructions of the parent one.
The text was updated successfully, but these errors were encountered:
Currently nested containers are validated by recursive calls to validation function (see
eof-create4
branch). Subcontainers are validated before instruction validation of parent container, becauseCREATE3
validation requires to know whether target child container is truncated or not.Recursion is potentially attackable by nesting containers many levels deep causing client's stack overflow. It is better to rewrite is as interation, here is a sketch of an algorithm:
Essentially you need to validate child container headers before validating instructions of the parent one.
The text was updated successfully, but these errors were encountered: