Skip to content

ContentBlacklist: fastTrackBlacklistAppeal grants interim relief over an already-removed entry #1307

Closed as not planned

Description

@yigitdot

Found during the review of #1304. Not introduced by it — #1304 only made the behavior visible (and its test now explicitly declines to bless it).

The state

fastTrackBlacklistAppeal (contracts/src/ContentBlacklist.sol:646) has one precondition: a.status == Open. It carries no entry-existence check. removeHashGlobal/removeHashRegional carry no hasActiveAppeal guard, so between openBlacklistAppeal (which does require addedAt != 0) and the fast-track, the entry can be deleted.

Fast-tracking then produces:

  • a.status = FastTracked — the contract's own encoding of "interim relief is in force"
  • regionActiveReliefCount and filerRegionActiveRelief both incremented (caps are 3 and 2)
  • BlacklistAppealFastTracked(appealId) emitted
  • no suspension, because there is no entry to suspend

AppealStatus.FastTracked is not a bookkeeping label — cleanupExpiredBlacklistAppeal says in prose that fast-tracked appeals hold "an interim-relief slot and a suspended entry", and rejectBlacklistAppeal/rejectAppealAsPerjury branch on it to decide whether to clear a suspension. The status asserts a fact storage does not support.

Pre-#1304 this was equally fake — it wrote suspended = true onto a zeroed struct, which _isLive (addedAt != 0 && !suspended) ignores anyway. #1304's guard makes the write a clean no-op instead. Neither version grants real relief.

Severity: low-medium, not an attack vector

Only EMERGENCY_MULTISIG_ROLE (3-of-5) can fast-track, so this is a governance mistake, not a griefing lever. But it consumes a scarce capped resource and puts the appeal in a state where two different exits disagree:

  • cleanupExpiredBlacklistAppeal → condition (c), reason 3, refunds the bond and releases both slots.
  • reverseBlacklistAppeal → succeeds and burns the bond, of a filer whose appeal was mooted by the protocol's own removal. cleanupExpiredBlacklistAppeal's comment explicitly says a burn here "would be punitive".
  • ratifyBlacklistAppealRemoval → reachable only because the status flipped, then reverts EntryNotBlacklisted two frames down in _removeHashRegional (now pinned by test_ratify_entryRemovedMidAppeal_reverts).

Proposed fix

Reject the fast-track outright, before the cap checks so no counter is touched:

if (_hashEntries[region][a.hash].addedAt == 0) revert EntryNotBlacklisted(region, a.hash);

EntryNotBlacklisted already exists and is already used for exactly this condition in openBlacklistAppeal and _removeHashRegional.

Reverting costs nothing. The appeal stays Open, and cleanupExpiredBlacklistAppeal accepts Open, hits the entryGone branch (reason 3), skips the window gate entirely, and refunds the bond. That exit is permissionless and immediately available — verified by the existing test_cleanup_globalOverride_open_refunds. Nothing is bricked, no slot is leaked (an Open appeal never charged the caps).

This also makes status == FastTracked imply a real suspension again, and eliminates the stale-flag scenario _addHash's suspended = false reset defends against, at its source.

Check before implementing

This changes a governance entry point's behavior, so the ADR 031 appeal state machine should be re-read alongside it — in particular whether "multisig fast-tracks an appeal whose entry was already removed" is supposed to be admissible at all, or whether the multisig should simply be routed to cleanupExpiredBlacklistAppeal.

Refs #1304, #1299.

Activity

  1. added
    kind:bug
    area:contracts
    on Jul 19, 2026
  2. yigitdot commented on Jul 19, 2026

    @yigitdot
    ContributorAuthor

    Already fixed on main (469e7d3). The exact guard this issue proposes is live in fastTrackBlacklistAppeal at contracts/src/ContentBlacklist.sol:664, placed before the cap checks as suggested so no counter is touched:

    if (_hashEntries[region][a.hash].addedAt == 0) revert EntryNotBlacklisted(region, a.hash);

    It carries a 7-line comment (:658-663) describing this scenario directly — the global-override mid-appeal deletion, the two scarce relief slots, and cleanupExpiredBlacklistAppeal (condition c, reason 3) as the filer's refunding exit — and closes with "Mirrors ratify's revert on the same precondition."

    Closing as resolved. Verified by reading the current source, not by inference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:contractskind:bug

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions