Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

token-2022: Amount Casting - Imprecision/Overflow - HAL-05 #3799

Open
joncinque opened this issue Nov 4, 2022 · 0 comments
Open

token-2022: Amount Casting - Imprecision/Overflow - HAL-05 #3799

joncinque opened this issue Nov 4, 2022 · 0 comments

Comments

@joncinque
Copy link
Contributor

Description

The amount_to_ui_amount and ui_amount_to_amount instructions take an u64 amount and f64 amount, do some arithmetic operations and cast the result to f64 and u64 respectively. When converting/casting between types, an “overflow”/wrapping or mismatch may occur and result in logic bugs.

@joncinque joncinque moved this to Audits in SPL Token 22 Apr 17, 2023
@github-actions github-actions bot added the stale [bot only] Added to stale content; will be closed soon label Nov 6, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 14, 2023
@github-project-automation github-project-automation bot moved this from Audits to Closed in SPL Token 22 Nov 14, 2023
@joncinque joncinque reopened this Nov 14, 2023
@github-project-automation github-project-automation bot moved this from Closed to Needs triage in SPL Token 22 Nov 14, 2023
@joncinque joncinque moved this from Needs triage to Audits in SPL Token 22 Nov 14, 2023
@github-actions github-actions bot removed the stale [bot only] Added to stale content; will be closed soon label Nov 15, 2023
@github-actions github-actions bot added the stale [bot only] Added to stale content; will be closed soon label Nov 14, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 21, 2024
@github-project-automation github-project-automation bot moved this from Audits to Closed in SPL Token 22 Nov 21, 2024
@joncinque joncinque reopened this Nov 21, 2024
@github-project-automation github-project-automation bot moved this from Closed to Needs triage in SPL Token 22 Nov 21, 2024
@github-actions github-actions bot removed the stale [bot only] Added to stale content; will be closed soon label Nov 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: Needs triage
Development

No branches or pull requests

1 participant