You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
verify of Transaction currently checks that the Staking sender / recipient type must be set, if the the sender / recipient address is the staking contract, but does not enforce that the sender / recipient must be the staking contract, if the sender / recipient sender type is Staking.
Verification of the sender / recipient data, and potentially later processing of the data, are solely based on the sender / recipient type though.
Thus, it might be possible to, for example, send a transaction that is interpreted as a staking transaction, via the Staking sender / recipient type, which is not in fact to / from the staking contract.
There is a check here that the target account has the correct type when applying the transaction, so a transaction with an invalid sender/recipient type would not be accepted. We could however add an additional check to the intrinsic transaction verification to reject such transactions early, i.e. before attempting to apply them.
verify
ofTransaction
currently checks that theStaking
sender / recipient type must be set, if the the sender / recipient address is the staking contract, but does not enforce that the sender / recipient must be the staking contract, if the sender / recipient sender type isStaking
.Verification of the sender / recipient data, and potentially later processing of the data, are solely based on the sender / recipient type though.
Thus, it might be possible to, for example, send a transaction that is interpreted as a staking transaction, via the
Staking
sender / recipient type, which is not in fact to / from the staking contract.core-rs-albatross/primitives/transaction/src/lib.rs
Lines 337 to 349 in bf6bab5
PS: I did not confirm the issue on-chain, just filing this issue based on reading the code.
The text was updated successfully, but these errors were encountered: