Zondax / ledger-tezos

Apache License 2.0
8 stars 5 forks source link

Operation contents verification #165

Open ghost opened 3 years ago

ghost commented 3 years ago

Currently the app does little to verify that a given operation's content is actually valid outside of parsing it.

This, for example, means that the source is not checked and the app won't reject a transaction where the source is not the same as the ledger's own.

With that, the strict subset of operations allowed in the baking app is also missing verification, see https://github.com/Zondax/ledger-tezos/blob/ef4425540c7425b359e4112c52e07f4520207765/rust/app/src/handlers/baking.rs#L292-L294 https://github.com/Zondax/ledger-tezos/blob/ef4425540c7425b359e4112c52e07f4520207765/rust/app/src/handlers/baking.rs#L298

:link: zboto Link

jleni commented 3 years ago

In general, we rely on the network to reject most of these invalid cases. While we could add additional checks, there is a point where we can risk adding incorrect, incompatible restrictions or on-chain changes may evolve over time without the app being changed.