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

[Aptos Framework] Validate against empty execution hash in voting::resolve() #2154

Merged
merged 1 commit into from
Jul 23, 2022

Conversation

movekevin
Copy link
Contributor

@movekevin movekevin commented Jul 22, 2022

Description

Empty execution hash technically is not exploitable as transaction_context::script_hash() only returns empty if voting::resolve() is called from a script function and not script. This is not a serious issue as the transaction can only call voting::resolve() but cannot do anything else (script function is a single call per transaction). However, we might as well add a validation against empty execution hash for peace of mind.

Test Plan

Unit Tests


This change is Reviewable

Copy link
Contributor

@junkil-park junkil-park left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The more secure the better :)

@movekevin movekevin enabled auto-merge (squash) July 23, 2022 06:42
@github-actions
Copy link
Contributor

❌ Forge test failure

Forge is land-blocking

Forge test runner terminated

@github-actions
Copy link
Contributor

✅ Forge test success

Forge is land-blocking

all up : 6042 TPS, 2811 ms latency, 4600 ms p99 latency,no expired txns

@movekevin movekevin merged commit 1a53e3a into aptos-labs:main Jul 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants