fix(lang): guard AccountLoader against buffer truncation#4633
fix(lang): guard AccountLoader against buffer truncation#4633swaroop-osec wants to merge 12 commits into
Conversation
|
@swaroop-osec is attempting to deploy a commit to the OtterSec Team on Vercel. A member of the Team first needs to authorize it. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
|
@0x4ka5h Dropped the Please re-review |
Summary
Adds buffer-size checks in
AccountLoader::try_fromandAccountLoader::exit. If the buffer is undersized:try_fromreturnsAccountDidNotDeserialize(3003) up front instead of constructing a loader over a buffer that any subsequentload/load_mut/exitcall would reject.exitreturnsAccountDidNotDeserialize(3003) instead of rewriting the discriminator over a truncated body and aborting the tx.