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

🛡️ Inaccurate Compressed Size Tracking on Object Deletion in Objectarium #559

Closed
ccamel opened this issue May 23, 2024 · 0 comments · Fixed by #570
Closed

🛡️ Inaccurate Compressed Size Tracking on Object Deletion in Objectarium #559

ccamel opened this issue May 23, 2024 · 0 comments · Fixed by #570
Assignees
Labels
security audit Categorizes an issue or PR as relevant to Security Audit

Comments

@ccamel
Copy link
Member

ccamel commented May 23, 2024

Note

Severity: Low
target: v5.0.0 - Commit: cde785fbd2dad71608d53f8524e0ef8c8f8178af
Ref: OKP4 CosmWasm Audit Report v1.0 - 02-05-2024 - BlockApex

Description

In the Objectarium contract, there is a discrepancy in how compressed sizes are handled during the lifecycle of an object. While the store_object function correctly increments the compressed_size statistic upon storing an object, the corresponding decrement operation is missing in the forget_object function when an object is removed. This oversight leads to inaccurate tracking of the compressed data size within the system.

Recommendation

To resolve this issue, update the forget_object function to include a decrement operation for the compressed_size stat similar to how it handles other metrics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
security audit Categorizes an issue or PR as relevant to Security Audit
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants