-
Notifications
You must be signed in to change notification settings - Fork 3.8k
should faild if the permission is not created when linkauth,but now it success. #6290
Comments
Indeed this is an oversight. After reviewing the permission/authorization code I can claim that the only implications of this oversight are less safeguards by the chain to prevent the user from inconveniencing themselves. A user is still not able to link to the empty permission (which is good because otherwise they would never be able to unlink it), nor to any of the However, this bug means that a user could potentially link to a permission that does not actually exist under their account. The implications of that are:
Furthermore, this bug breaks the previously assumed invariant that all permission links map to an existing permission. Fortunately, our code has not yet relied on that invariant in any way that would lead to a security issue (to my knowledge). Even if this bug is fixed in a future consensus protocol upgrade, we cannot rely on that invariant going forward since there may be existing broken links that were created before the consensus protocol feature activation. Additionally, we could add subjective mitigations to protect against this relatively soon rather than waiting until a consensus protocol feature activation before anything is done about it. |
The objective fix to this bug is tracked in #6333. This issue is left to track a subjective mitigation that rejects |
There is no real need for a subjective mitigation since this isn't a security issue and the proper fix has been implemented as part of the protocol feature introduced in #6831. |
void apply_eosio_linkauth(apply_context& context) {
// context.require_write_lock( config::eosio_auth_scope );
auto requirement = context.act.data_as();
try {
EOS_ASSERT(!requirement.requirement.empty(), action_validate_exception, "Required permission cannot be empty");
this cause linkauth permission success when the requirement permission exists but the permission is not created by the account.
The text was updated successfully, but these errors were encountered: