Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fuzz bug: InternalError: deserialize a non-representable scval #1174

Closed
graydon opened this issue Nov 3, 2023 · 0 comments · Fixed by #1180
Closed

Fuzz bug: InternalError: deserialize a non-representable scval #1174

graydon opened this issue Nov 3, 2023 · 0 comments · Fixed by #1180
Assignees
Labels
bug Something isn't working fuzz

Comments

@graydon
Copy link
Contributor

graydon commented Nov 3, 2023

   1: [Diagnostic Event] contract:0000000000000000000000000000000000000000000000000000000000000000, topics:[error, Error(Value, InternalError)], data:["unexpected non-Val-representable ScVal type", 20]

inside a call to deserialize_from_bytes, from this program:

	Expr(
	    deserialize_from_bytes(
	        bytes_push(
	            bytes_pop(
	                serialize_to_bytes(
	                    vec_back(
	                        vec_push_back(
	                            vec_new_or_existing(
	                                0,
	                            ),
	                            sub_Void(
	                                extend_contract_instance_and_code(
	                                    get_current_contract_address,
	                                    get_ledger_version,
	                                    get_ledger_version,
	                                ),
	                            ),
	                        ),
	                    ),
	                ),
	            ),
	            get_ledger_version,
	        ),
	    ),
	)

Probably just a little too quick to treat non-representability as InternalError rather than potentially-user-controlled input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fuzz
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant