This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
Consensus protocol upgrade to fix excessive restrictions of eosio::linkauth #6672
Labels
CONSENSUS
Introduces a change that may modify consensus protocol rules on an existing blockchain.
Background
To preserve the security properties of five special native actions, they cannot be linked to a custom minimum permission. This code is enforced in
authorization_manager::check_linkauth_authorization
by blacklisting the special actions by name. Unfortunately, there is a bug in that code which causes it to only consider the name of the action and not also require that the code account iseosio
. This means the restriction applies to an action of any contract as long as it is named one of the following:updateauth
,deleteauth
,linkauth
,unlinkauth
,canceldelay
. This bug was originally reported in #6654.Until this bug is fixed with a consensus protocol upgrade, contracts should avoid naming their actions any of above five names. Doing so would not result in a security issue, however, it would prevent users from setting a custom minimum permission for those actions.
Consensus upgrade feature
The goal of this consensus upgrade feature is to correct the checks that prevent an
eosio::linkauth
action from being used on the five special native actions (and only those five actions).A new consensus protocol upgrade feature will be added to trigger the changes described in this consensus upgrade proposal. The actual digest for the feature understood at the blockchain level is to be determined. For the purposes of this proposal the codename
FIX_LINKAUTH_RESTRICTION
will be use to stand-in for whatever the feature identifier will actually end up being.In
authorization_manager::check_linkauth_authorization
, the five assertion checksshould be guarded by an if statement that only allows those assertions to be checked if
FIX_LINKAUTH_RESTRICTION
has not yet been activated ORlink.code == config::system_account_name
.The text was updated successfully, but these errors were encountered: