Skip to content

fix(lang-v2): enforce PodVec MAX fits u16 length prefix - #4907

Open
akash-osec wants to merge 1 commit into
otter-sec:anchor-nextfrom
akash-osec:fix/v2-podvec-max-u16
Open

fix(lang-v2): enforce PodVec MAX fits u16 length prefix#4907
akash-osec wants to merge 1 commit into
otter-sec:anchor-nextfrom
akash-osec:fix/v2-podvec-max-u16

Conversation

@akash-osec

Copy link
Copy Markdown
Member

Fixes finding AI # 43:

PodVec stored len as u16 but accepted any MAX, so oversized vectors could be declared and advertise capacity until a mutation forced the assert. Now, it force the bound via CAPACITY/Default/reads and reject oversized PodVec fields in #[account].

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 47.22222% with 19 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (anchor-next@52e948e). Learn more about missing BASE report.

Files with missing lines Patch % Lines
lang-v2/derive/src/lib.rs 34.48% 19 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@              Coverage Diff               @@
##             anchor-next    #4907   +/-   ##
==============================================
  Coverage               ?   64.99%           
==============================================
  Files                  ?      127           
  Lines                  ?    15892           
  Branches               ?        0           
==============================================
  Hits                   ?    10329           
  Misses                 ?     5563           
  Partials               ?        0           
Flag Coverage Δ
v2 64.99% <47.22%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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