solana icon indicating copy to clipboard operation
solana copied to clipboard

Missing invoke translation test

Open jackcmay opened this issue 4 years ago • 2 comments

Problem

Missing a test that verifies the AccountInfo's data length is correctly enforced to exist in RW data. The length is translated correctly but we have no way to ensure that it will continue to do so over time.

https://github.com/solana-labs/solana/blob/5dceddd21d3c1cf874b003a0c25b1f21f4926614/programs/bpf/rust/ro_modify/src/lib.rs#L158

Proposed Solution

AccountInfo's data is expressed as an Rc<RefCell<&mut [u8]>>, need a way to construct this where the slice's len is in RO memory (like the RO segment of a BPF ELF) while the data pointer points to RW memory. This is not a use case that can be activated without malicious intent.

jackcmay avatar Dec 04 '20 04:12 jackcmay

Hello @jackcmay, I'd love to tackle this issue. Is there more information you can give me on the problem? I'm new to Solana lol

tyirenkyi avatar Nov 19 '21 10:11 tyirenkyi

Is anyone working on this ?

Nagaprasadvr avatar Jan 27 '24 13:01 Nagaprasadvr