Skip to content

Commit f28cef2

Browse files
committed
Adds zeroing of account realloc padding after account truncation in CPI.
1 parent b58dd13 commit f28cef2

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

proposals/0219-stricter-vm-verification.md

+12
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,18 @@ instruction accounts must immediately become visible in their memory regions
9191
as well. This is distinct from the previous behavior which only updated
9292
aliasing instruction account payloads at CPI or the end of the instruction.
9393

94+
### Zeroing of account realloc padding after account truncation in CPI
95+
96+
Only programs of loader-v1 do not have any realloc padding behind each account
97+
in their serialization format. Programs of all other loaders have 10 KiB
98+
padding behind each account. Currently, after a CPI in which the callee
99+
truncates an account, this realloc padding is only zeroed in the range between
100+
what the caller had used and what the callee had truncated it down to. The
101+
range from what the caller had used up to the end of the realloc padding stays
102+
untouched throughout CPI. With the activation of this feature the entire rest
103+
of the account from its new truncated length up to the end of the realloc
104+
padding must be zeroed.
105+
94106
### Syscall slice parameters
95107

96108
When a range in virtual address space which:

0 commit comments

Comments
 (0)