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

Fix - CPI interface bool masking #33623

Merged
merged 1 commit into from
Oct 10, 2023

Conversation

Lichtso
Copy link
Contributor

@Lichtso Lichtso commented Oct 10, 2023

Problem

The current ABI is unstable as it confuses bool and u8.

Summary of Changes

Extends the feature gate of disable_cpi_setting_executable_and_rent_epoch:

  • Rejects transactions in which a program sets invalid values to AccountMeta::is_signer or AccountMeta::is_writable
  • Ignores the values set to: AccountInfo::executable and AccountInfo::rent_epoch

Feature Gate Issue: #26988

@Lichtso Lichtso added the v1.17 PRs that should be backported to v1.17 label Oct 10, 2023
@Lichtso Lichtso requested a review from alessandrod October 10, 2023 12:49
@codecov
Copy link

codecov bot commented Oct 10, 2023

Codecov Report

Merging #33623 (522a32f) into master (1704789) will decrease coverage by 0.1%.
Report is 2 commits behind head on master.
The diff coverage is 36.7%.

@@            Coverage Diff            @@
##           master   #33623     +/-   ##
=========================================
- Coverage    81.8%    81.8%   -0.1%     
=========================================
  Files         807      807             
  Lines      217999   218054     +55     
=========================================
+ Hits       178525   178561     +36     
- Misses      39474    39493     +19     

@Lichtso Lichtso merged commit 1262ff7 into solana-labs:master Oct 10, 2023
16 checks passed
@Lichtso Lichtso deleted the fix/cpi_boolean_masking branch October 10, 2023 14:09
mergify bot pushed a commit that referenced this pull request Oct 10, 2023
Adds masking of booleans in CPI interface to disable_cpi_setting_executable_and_rent_epoch.

(cherry picked from commit 1262ff7)
Lichtso added a commit that referenced this pull request Oct 10, 2023
Fix - CPI interface `bool` masking (#33623)

Adds masking of booleans in CPI interface to disable_cpi_setting_executable_and_rent_epoch.

(cherry picked from commit 1262ff7)

Co-authored-by: Alexander Meißner <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v1.17 PRs that should be backported to v1.17
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants