Skip to content

fix: validate sysvar data before refreshing the sysvar cache - #436

Merged
Aursen merged 1 commit into
LiteSVM:masterfrom
Iamsohungrynow:fix/sysvar-cache-rejected-write
Oct 18, 2026
Merged

Aursen merged 1 commit into
LiteSVM:masterfrom
Iamsohungrynow:fix/sysvar-cache-rejected-write

Conversation

@Iamsohungrynow

Copy link
Copy Markdown
Contributor

set_account with invalid sysvar data returned an error but still wiped that sysvar from the cache, so after a bad rent write the next transaction panicked at lib.rs:1318. i now check the data before resetting the cache

`handle_sysvar` reset the sysvar cache and refilled it from the new account before checking that the data parses, so a rejected write still dropped that sysvar from the cache. after an invalid rent write the next transaction panicked at `lib.rs:1318` with `UnsupportedSysvar`. LiteSVM#20 checked first, LiteSVM#95 moved the check below the reset. i moved it back above, like the clock branch already does
@Iamsohungrynow
Iamsohungrynow force-pushed the fix/sysvar-cache-rejected-write branch from af1ad7a to 0b57e27 Compare October 17, 2026 13:21
@Aursen
Aursen merged commit 4955e69 into LiteSVM:master Oct 18, 2026
23 checks passed
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