Skip to content

metal: convolution ring lookup overflows at valid high positions #795

Open

Description

@github-actions

A public delta_rows call with pos = u32::MAX - 9 and nine rows passes check_rows. In tap_x, row 0 with distance 1 computes ring slot 0 instead of slot 4 because pos0 + RING_ROWS - back wraps before the modulo. Distinct finite ring values therefore produce incorrect convolution inputs and recurrent state without a fault. This expression already exists on the base branch. After the existing pos0 < back guard, compute (pos0 - back) % BLOOMERY_DELTA_RING_ROWS. Apply the same subtraction to the shared oracle's tap, whose current addition also overflows. Add a boundary case checked against independently calculated predecessor slots.

Evidence (at the base of #792):

Filed by Shingler, the review bot, while reviewing #792; the defect is outside that pull request.

Activity

  1. added
    review-botFiled by the PR review bot: a defect found outside the reviewed pull request
    on Oct 24, 2026
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

    review-botFiled by the PR review bot: a defect found outside the reviewed pull request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions