{
  "schema_version": "1.0",
  "url": "https://cerinamroth.com/disclosures/zkvm-divrem-soundness-trilogy/",
  "title": "Three zkVMs, One Missing Division Constraint (Pico, ZisK, Venus) — Cerin Amroth",
  "description": "Pico, ZisK and Venus each checked the division identity but left part of the remainder rule unasserted, so a wrong remainder could be proven. All are fixed.",
  "date_modified": "2026-12-02",
  "representations": {
    "json": "https://cerinamroth.com/data/pages/disclosures/zkvm-divrem-soundness-trilogy.json",
    "markdown": "https://cerinamroth.com/data/pages/disclosures/zkvm-divrem-soundness-trilogy.md"
  },
  "headings": [
    {
      "level": 1,
      "id": null,
      "text": "Three zkVMs, one missing constraint: division that proves the wrong remainder"
    },
    {
      "level": 2,
      "id": null,
      "text": "Summary"
    },
    {
      "level": 2,
      "id": null,
      "text": "Pico: the bound is computed, never asserted"
    },
    {
      "level": 2,
      "id": null,
      "text": "ZisK: the remainder's sign goes free"
    },
    {
      "level": 2,
      "id": null,
      "text": "Venus (Cysic): the same omission, inherited from a fork, fixed in v0.3.1"
    },
    {
      "level": 2,
      "id": null,
      "text": "What the fixes teach"
    },
    {
      "level": 2,
      "id": null,
      "text": "Impact"
    },
    {
      "level": 2,
      "id": null,
      "text": "Scope, stated plainly"
    },
    {
      "level": 2,
      "id": null,
      "text": "Disclosure timeline"
    }
  ],
  "links": [
    {
      "text": "Cerin Amroth",
      "url": "https://cerinamroth.com/"
    },
    {
      "text": "Home",
      "url": "https://cerinamroth.com/"
    },
    {
      "text": "ML",
      "url": "https://cerinamroth.com/ml/"
    },
    {
      "text": "JWST",
      "url": "https://cerinamroth.com/jwst/"
    },
    {
      "text": "Security",
      "url": "https://cerinamroth.com/policy/"
    },
    {
      "text": "Contact",
      "url": "https://cerinamroth.com/#contact"
    },
    {
      "text": "← all disclosures",
      "url": "https://cerinamroth.com/disclosures/"
    },
    {
      "text": "v2.1.2",
      "url": "https://github.com/brevis-network/pico/releases/tag/v2.1.2"
    },
    {
      "text": "PR #111",
      "url": "https://github.com/brevis-network/pico/pull/111"
    },
    {
      "text": "683e6d9",
      "url": "https://github.com/0xPolygonHermez/zisk/commit/683e6d9c4edb4e500f3d27e79ccffa8783e618ec"
    },
    {
      "text": "v0.3.1",
      "url": "https://github.com/cysic-zk/venus/releases/tag/v0.3.1"
    },
    {
      "text": "7530178",
      "url": "https://github.com/cysic-zk/venus/commit/753017827da9a0cc8f1cc49c69cd69a5d8df12b7"
    },
    {
      "text": "ZisK: a missing sign constraint in signed remainder",
      "url": "https://cerinamroth.com/disclosures/zisk-signed-rem-sign-soundness/"
    },
    {
      "text": "PR #1228",
      "url": "https://github.com/0xPolygonHermez/zisk/pull/1228"
    },
    {
      "text": "sibling report",
      "url": "https://github.com/codygunton/zisk/pull/12"
    },
    {
      "text": "GHSA-qjgg-fcj3-p9x3",
      "url": "https://github.com/0xPolygonHermez/zisk/security/advisories/GHSA-qjgg-fcj3-p9x3"
    },
    {
      "text": "its own advisory",
      "url": "https://github.com/advisories/GHSA-g3qg-6746-3mg9"
    },
    {
      "text": "our key",
      "url": "https://cerinamroth.com/.well-known/cerinamroth-pubkey.asc"
    },
    {
      "text": "security@cerinamroth.com",
      "url": "mailto:security@cerinamroth.com"
    }
  ],
  "structured_data": [
    {
      "@context": "https://schema.org",
      "@type": "TechArticle",
      "headline": "Three zkVMs, one missing constraint: division that proves the wrong remainder",
      "description": "Pico, ZisK and Venus each checked the division identity but left part of the remainder rule unasserted, so a wrong remainder could be proven. All are fixed.",
      "url": "https://cerinamroth.com/disclosures/zkvm-divrem-soundness-trilogy/",
      "mainEntityOfPage": "https://cerinamroth.com/disclosures/zkvm-divrem-soundness-trilogy/",
      "datePublished": "2026-12-02T00:00:00Z",
      "dateModified": "2026-12-02T00:00:00Z",
      "image": "https://cerinamroth.com/brand/cerin-amroth-card-brand.png?v=ceed00050b87",
      "author": {
        "@type": "Person",
        "name": "Paul Jordan Anderson",
        "url": "https://cerinamroth.com/disclosures/zkvm-divrem-soundness-trilogy/#author"
      },
      "publisher": {
        "@type": "Organization",
        "@id": "https://cerinamroth.com/#organization",
        "name": "Cerin Amroth Research",
        "url": "https://cerinamroth.com/"
      },
      "inLanguage": "en",
      "isPartOf": {
        "@type": "WebSite",
        "name": "Cerin Amroth Research",
        "url": "https://cerinamroth.com/"
      },
      "about": "Pico (Brevis), ZisK, Venus (Cysic)"
    },
    {
      "@context": "https://schema.org",
      "@type": "BreadcrumbList",
      "itemListElement": [
        {
          "@type": "ListItem",
          "position": 1,
          "name": "Home",
          "item": "https://cerinamroth.com/"
        },
        {
          "@type": "ListItem",
          "position": 2,
          "name": "Security disclosures",
          "item": "https://cerinamroth.com/disclosures/"
        },
        {
          "@type": "ListItem",
          "position": 3,
          "name": "Three zkVMs, one missing constraint: division that proves the wrong remainder",
          "item": "https://cerinamroth.com/disclosures/zkvm-divrem-soundness-trilogy/"
        }
      ]
    }
  ],
  "content_markdown": "[Cerin Amroth](https://cerinamroth.com/) · Security Disclosures [Home](https://cerinamroth.com/)[ML](https://cerinamroth.com/ml/)[JWST](https://cerinamroth.com/jwst/)[Security](https://cerinamroth.com/policy/)[Contact](https://cerinamroth.com/#contact)\n\n \n\n[← all disclosures](https://cerinamroth.com/disclosures/)\n\n \n\n# Three zkVMs, one missing constraint: division that proves the wrong remainder\n\nAuthor Paul Jordan Anderson · Project Pico (Brevis), ZisK, Venus (Cysic) · Class CWE-682 (Incorrect Calculation), under-constrained circuit · Severity Critical (soundness) · Reported 2026-06-06 · Fixed 2026-09-18\n\nThree zkVMs enforced the division identity and left part of the remainder rule computed but never asserted. Each constraint set admitted a wrong quotient or remainder. All three are now fixed.\n\n \n\nAffected Pico `divrem` chip at `brevis-network/pico` `22b0aae6`; ZisK arithmetic state machine at `0xPolygonHermez/zisk` `6182c8be`; Venus arithmetic state machine at `cysic-labs/venus` `130de8f2` (the repository is now `cysic-zk/venus`) · Fixed Pico [`v2.1.2`](https://github.com/brevis-network/pico/releases/tag/v2.1.2) ([PR #111](https://github.com/brevis-network/pico/pull/111)); ZisK [`683e6d9`](https://github.com/0xPolygonHermez/zisk/commit/683e6d9c4edb4e500f3d27e79ccffa8783e618ec); Venus [`v0.3.1`](https://github.com/cysic-zk/venus/releases/tag/v0.3.1) ([`7530178`](https://github.com/cysic-zk/venus/commit/753017827da9a0cc8f1cc49c69cd69a5d8df12b7)) · Reporter Paul Jordan Anderson, jordan@cerinamroth.com\n\n \n\n## Summary\n\n \n\nA zero-knowledge virtual machine makes one promise: if the proof verifies, the program ran correctly. Nobody downstream re-executes—not the verifier, not the rollup, not the bridge. So whatever the division chip accepts about a division is that division for everyone who trusts the proof.\n\n \n\nRISC-V integer division has one correct quotient and remainder. Two facts pin it together: the identity `dividend = divisor·quotient + remainder`, and the remainder rule—`|remainder| < |divisor|`, and for signed operations the remainder takes the dividend's sign. The identity alone is satisfied by a whole family of pairs. Only the remainder rule collapses the family to one.\n\n \n\nAll three of these zkVMs got the identity right and left part of the remainder rule unasserted. They are one class and two distinct omissions. Pico dropped the magnitude bound. ZisK dropped the sign rule for negative dividends. Venus is a fork of ZisK and shipped the same files until v0.3.1.\n\n \n\n## Pico: the bound is computed, never asserted\n\n \n\nThe Pico finding is a confirmed independent rediscovery. It claims no novelty, no CVE and no credit. Brevis already had the fix from a Nethermind audit, in PR #101 of `brevis-network/pico` (opened 2026-05-20, fix commit \"fix(alu): enforce remainder < divisor in divrem constraints\"). That PR was still open when this was reported, so the bug was live on `main` at `22b0aae6`.\n\n \n\nPico's `divrem` chip binds the identity through a `MulGadget`, which leaves `|remainder| < |divisor|` as the only thing pinning the result. It hands that to `LtWordU16Gadget`:\n\n \n\n```\n// vm/src/chips/gadgets/lt_word_u16.rs, LtWordU16Gadget::eval (L172-193)\nbuilder.assert_bool(cols.bit);                       // L179: bit is boolean, and only boolean\nlet base = CB::Expr::from_canonical_u32(1 << 16);    // L180\nlet diff = a - b + cols.bit * base;                  // L181\n//   If a <  b, then bit must be one  for diff to be in [0, 2^16).\n//   If a >= b, then bit must be zero for diff to be in [0, 2^16).\nbuilder.looking_rangecheck(ByteOpcode::U16Range, diff, …, is_real);   // L186-193\n```\n\n \n\nThat is a consistency gadget, not an assertion: `(bit = 1, a < b)` and `(bit = 0, a >= b)` both satisfy it. Getting a strict less-than out of it is the caller's job, one `assert_one(bit)`, and the chip never made the call:\n\n \n\n```\n// vm/src/chips/chips/alu/divrem/constraints.rs:558-564\n// Dispatch abs(remainder) < max(abs(c), 1), equivalent to abs(remainder) < abs(c)\n// if not division by 0.\nLtWordU16Gadget::<CB::F>::eval(\n    builder,\n    local_abs_remainder.map(|v| v.into()),\n    local_max_abs_c_or_1.map(|v| v.into()),\n    local_remainder_lt_gadget,\n    local_remainder_check_multiplicity.into(),\n);\n```\n\n \n\n`remainder_lt_gadget` appears in four places in the repository—declared, populated, destructured, evaluated—and its `.bit` is never asserted to be one. The multiplicity argument is `(1 - is_c_0) * is_real`, which is one for an ordinary division, so the gadget runs and still accepts the forgery. The asserting primitives sat one file over, unused: `AssertLtColsBytes` and `AssertLtColsBits` in `lt.rs`. It reads like a porting regression: a less-than primitive swapped for a same-shaped one that only computes the bit.\n\n \n\nSo `REMU 10 / 3` could be proven as remainder 4, 7 or 10 by choosing quotient 2, 1 or 0. The identity holds for each.\n\n \n\n## ZisK: the remainder's sign goes free\n\n \n\nZisK verifies division on magnitudes and carries the signs as boolean flags, with a generated table deciding which combinations are legal. The rule that the remainder takes the dividend's sign was written in a comment and enforced only in the division-by-zero case. On the ordinary path the table required `nr <= np` and nothing more, so a negative dividend left the remainder's sign flag free: `REM(-7, 3)` could be proven as `+1`.\n\n \n\nThe full account has its own page: [ZisK: a missing sign constraint in signed remainder](https://cerinamroth.com/disclosures/zisk-signed-rem-sign-soundness/). The fix, [PR #1228](https://github.com/0xPolygonHermez/zisk/pull/1228), was written for Cody Gunton's [sibling report](https://github.com/codygunton/zisk/pull/12) of the unpinned quotient sign and closed this hole too. The ZisK team then accepted and published [GHSA-qjgg-fcj3-p9x3](https://github.com/0xPolygonHermez/zisk/security/advisories/GHSA-qjgg-fcj3-p9x3), rated Critical.\n\n \n\n## Venus (Cysic): the same omission, inherited from a fork, fixed in v0.3.1\n\n \n\nVenus is a fork of ZisK, and until v0.3.1 its arithmetic state machine was the upstream one, unchanged. Venus's `arith_table.pil` and `arith.pil` were byte-identical to the ZisK files that carried the bug (MD5 `5ad47a52...` and `28ba3613...` on both sides). They arrived in commit `572f54f9` (\"[init] monorepo rebump from 0.16\", 2026-03-24) and were not modified in any public release through v0.3.0 (2026-09-07).\n\n \n\nSo a Venus build before v0.3.1 had ZisK's under-constraint exactly. The sign bits `na/nb/nr/np` are prover-supplied witness columns, and for a negative dividend nothing bound the remainder sign `nr` to the dividend sign `np`. The same forged witness worked:\n\n \n\n1. Operation flags for signed 64-bit `REM -7 / 3`.\n2. Commit `(div=1, signed=1, na=1, nb=0, np=1, nr=0)`, magnitudes `2` and `1`.\n3. The magnitude identity `7 = 2*3 + 1` holds.\n4. The bound `1 < 3` holds.\n5. No sign-table rule rejects the row.\n6. The circuit emits `REM(-7, 3) = +1` instead of `-1`.\n\n \n\nThe fix. Venus v0.3.1 (published 2026-09-18 02:51 UTC; commit `7530178`, \"Fix signed remainder sign constraint\") adds one constraint to `arith.pil` and `arith_mul64.pil`:\n\n \n\n```\ndiv * np * (1 - nr) * sum_all_ds === 0;\n```\n\n \n\n`sum_all_ds` is the sum of the range-checked remainder chunks. When the dividend is negative and the remainder is claimed non-negative, every remainder chunk must be zero. That rejects the forged `REM(-7, 3) = +1` and still accepts the honest exact division `REM(-6, 3) = 0`. The release adds regression tests for `REM` and `REMW`, covering both the forged positive remainder and the valid zero remainder.\n\n \n\nThis is a different fix from upstream's. ZisK added a `remainder_is_zero` flag and rebuilt the sign table (commit `683e6d9`, 2026-07-29). Cysic's v0.3.1 change is smaller and gets the zero-remainder case right. The one-line rule in the original report did not: rejecting every `np != nr` on the signed path would also have rejected honest exact divisions. Later Venus releases changed form again; as of v0.5.0, `arith.pil` binds a `remainder_is_zero` flag as upstream does.\n\n \n\nWho needs to act. Anyone running a Venus build older than v0.3.1 should upgrade. The release notes say verifier inputs and proof format are unchanged, and that proving keys and setup artifacts must be regenerated for the updated circuit.\n\n \n\nVendor response. The finding was reported to Cysic by email on 2026-06-08, and that report had no reply. A follow-up went out on 2026-09-17, the day the ZisK team published its advisory, and the Cysic team replied the same day. Cysic said the fix had been made privately when the report first arrived, and they published it as v0.3.1 that day.\n\n \n\nScope caveat. The Venus result is verified at the constraint level. The pre-fix files are byte-identical to ZisK's, and the fix is described from the public v0.3.1 diff and release notes. No Venus prover was run, either to produce an accepted forged proof before the fix or to confirm the rejection after it.\n\n \n\nVenus is also the clearest illustration of why this class matters beyond one project. A soundness omission in a forked zkVM does not stay in one repository. It travels with the fork into every downstream until that downstream fixes it.\n\n \n\n## What the fixes teach\n\n \n\nPico's fix is the missing call. At `v2.1.2`, `constraints.rs:598` reads `assert_one(local_remainder_lt_gadget.bit)`.\n\n \n\nZisK's fix is more interesting, because the one-line fix this report proposed was wrong. The report said: reject `np != nr` on the signed path. That also rejects honest exact divisions, where a negative dividend has a remainder of zero and zero has no sign. The old table allowed `nr = 0` under a negative dividend for exactly that reason. What it lacked was anything tying `nr = 0` to the remainder actually being zero. ZisK's commit `683e6d9`, prompted by Cody Gunton's report of the same gap on the quotient's sign, adds `result_is_zero` and `remainder_is_zero` flags, binds each to its value in `arith.pil`, and makes the table demand a negative remainder whenever the dividend is negative and the flag is clear. The Venus report carried the same one-line fix, and Cysic did not take it either: v0.3.1 added the smaller constraint described above, which also gets the zero case right.\n\n \n\nThe pattern across all three: a value the circuit needs is computed into a column, range-checked or made boolean, and then used—without the one constraint that says what it must equal. Every piece looks handled. Reading the constraint list for what is asserted, not for what is computed, is what finds it.\n\n \n\n## Impact\n\n \n\nThere is no second divider. The on-chain verifier checks the proof's algebra, the settlement contract reads the proven output, the bridge releases against the proven state root, and none of them re-divides. A wrong division becomes final when the proof is accepted. That makes each of these Critical by class.\n\n  \n- What the prover controls. Pico: the magnitude of the remainder, and with it the quotient—several forged values per division. ZisK and Venus: the sign of any nonzero remainder of a negative dividend, by flipping one flag. \n- Who is affected. Anyone settling value or state on proofs from a prover built before the fixes. For Venus that includes every deployment or downstream fork still on a build older than v0.3.1. \n- Reversibility. None at the layer that matters. Recovery is a governance event: pause, roll back, fork. \n\n \n\n## Scope, stated plainly\n\n  \n- These are circuit-level results, not exploits against a deployed application. What was shown is that each constraint set admits a forged row. No attack on a system settling these proofs was built or attempted. \n- For ZisK, the forged row was checked for table acceptance, the magnitude identity and bound, and replayed against the project's witness code for table membership and chunk range checks. The full chunked two's-complement identities were not solved by hand, and no prover was run end to end. \n- For Venus there is no executed proof of concept. The result rests on the pre-fix files being byte-identical to ZisK's, plus the same analysis; the fix is described from the public v0.3.1 diff and release notes. \n- The Venus finding is a root-cause duplicate of the ZisK finding. It is listed separately only because it shipped separately and the upstream patch did not fix it. Cysic fixed it in Venus v0.3.1. \n- These are forge-the-result breaks. They are not key extraction, not liveness failures, and not attacks on any proof system's cryptography. The proof systems are fine; the constraints fed to them were incomplete. \n- An earlier version of these reports called the class \"templated on\" RISC Zero's CVE-2025-52484. That CVE is a different mechanism—confusion between the `rs1` and `rs2` registers on three-register instructions—with a public CVSS v4.0 score of 2.7 (Low), though RISC Zero rated it Critical in [its own advisory](https://github.com/advisories/GHSA-g3qg-6746-3mg9). It is a comparable case of a zkVM accepting a proof of incorrect execution, and nothing more. \n\n \n\n## Disclosure timeline\n\n  \n- 2026-06-05: all three found and verified at the pinned commits; every file and line reference re-checked in source. \n- 2026-06-06: reported to Brevis by email, and to the ZisK team by email and as a private GitHub Security Advisory. \n- 2026-06-07: Brevis acknowledged the Pico report as a duplicate of the issue already fixed in PR #101. Closed as a duplicate: no credit, no CVE, no reward. \n- 2026-06-08: reported to Cysic by email (info@cysic.xyz; security@cysic.xyz bounced). Cysic says a fix was applied internally at that time. \n- 2026-07-27: Cody Gunton publicly reported the quotient-sign sibling in ZisK, `DIV(1, -1)` proven as `+1`. \n- 2026-07-29: the ZisK team opened PR #1228, crediting that report. Its commit `683e6d9` closes both holes. \n- 2026-08-17: Pico fix merged in PR #111 and released as `v2.1.2`. PR #101 was closed unmerged. \n- 2026-08-18 / 2026-08-26: ZisK `v1.1.0-alpha` and `v1.2.0-alpha` released, both containing the fix. \n- 2026-09-07: the last of the 90-day windows proposed to the three closed. \n- 2026-09-17: the ZisK team accepted GHSA-qjgg-fcj3-p9x3, noted that PR #1228 had already fixed it, and published it. Follow-up sent to Cysic; the Cysic team replied the same day. \n- 2026-09-18 (UTC): Venus `v0.3.1` released with the fix. \n- 2026-11-27: pre-publication notice sent to Cysic; Cysic asked to review the Venus section. \n- 2026-11-29: Cysic approved the revised Venus section. \n- 2026-11-30: Cysic agreed to publication ahead of the planned 2026-12-11 date. \n- 2026-12-02: published. \n\n \n\nGood-faith coordinated disclosure throughout, each report made unconditionally. No bounty program covered any of the three.\n\n Coordinated disclosure. Published only after a fix shipped or the disclosure window closed. · Verify signatures against [our key](https://cerinamroth.com/.well-known/cerinamroth-pubkey.asc). · [security@cerinamroth.com](mailto:security@cerinamroth.com)\n  © 2026 Cerin Amroth Security Research, LLC · CERIN AMROTH SECURITY RESEARCH™\n",
  "content_sha256": "c4f48cf3b0bc155639def418080fe755e27d8edd195fbf6191f96903a03c39ad"
}
