-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Native CPI caller write privileges is incorrect #18629
Comments
Since native_invoke is only called for the bpf upgradeable program and that program doesn't modify caller accounts before invoking the native create account instruction, there shouldn't be any change of behavior before and after the fix. |
What specifically do you think is blocking? |
#19645 introduces a change which modifies a buffer account before the native invoke which means that a malicious user could trick the bpf loader program to successfully deplete the balance of a readonly buffer account. |
This issue has been automatically locked since there has not been any activity in past 7 days after it was closed. Please open a new issue for related bugs. |
Problem
Caller write privileges are not created correctly for native cpi. The
caller_write_privileges
vector should match up withmessage.account_keys
because they will be indexed into in the same wayProposed Solution
message.account_keys
fix with no tests is in this branch: https://github.com/jstarry/solana/tree/fix-caller-write-privileges
The text was updated successfully, but these errors were encountered: