{
 "number": 36286,
 "repo": "bitcoin/bitcoin",
 "url": "https://github.com/bitcoin/bitcoin/pull/36286",
 "title": "crypto: Fix MuHash3072 division by itself",
 "author": "fjahr",
 "author_association": "MEMBER",
 "created_at": "2026-09-17T11:59:00Z",
 "updated_at": "2026-09-17T12:03:41Z",
 "age_days": 0,
 "draft": false,
 "labels": [
  "Utils/log/libs"
 ],
 "milestone": null,
 "base": "master",
 "head_sha": "d34560324296cd17619b561d1b044cf505a7a092",
 "head_ref": "2026-09-mush-div-fix",
 "head_repo": "fjahr/bitcoin",
 "head_history": [],
 "additions": 9,
 "deletions": 1,
 "changed_files": 3,
 "commit_count": 1,
 "size_bucket": "S",
 "mergeable_state": "unstable",
 "bot": {
  "drahtbot": {
   "present": true,
   "reviews": {},
   "conflicts": []
  }
 },
 "acks_parsed": {},
 "acks_tally": {
  "ack": 0,
  "stale_ack": 0,
  "concept_ack": 0,
  "approach_ack": 0,
  "nack": 0,
  "concept_nack": 0,
  "approach_nack": 0
 },
 "reviews": {
  "approved": 0,
  "changes_requested": 0,
  "distinct_reviewers": []
 },
 "signals": {
  "needs_rebase": false,
  "ci_failed": false,
  "mergeable_state": "unstable",
  "last_author_activity": "2026-09-17T08:56:54Z",
  "last_reviewer_activity": null,
  "last_reviewer": null,
  "author_silent_days": 0,
  "waiting_on_author_days": 0,
  "days_since_update": 0
 },
 "refs": {
  "mentioned": [],
  "depends_on": [],
  "fixes": [],
  "linked_issues": [],
  "references": [],
  "conflicts": []
 },
 "stack": {
  "shares_commits_with": [],
  "based_on": [],
  "base_for": []
 },
 "review_paths": [],
 "body": "`MuHash3072::operator/=` multiplies the numerator by the divisor's denominator and then the denominator by the divisor's numerator. But as it is currently implemented the divisor could be the MuHash object itself. When that is the case, the second step reads the numerator that the first step already updated, so `x /= x` actually leaves `1/D` instead of the empty set. This only goes unnoticed when the denominator is 1, which is the case in our existing fuzz target and benchmark. No code in the node/index divides MuHash objects by themselves, so runnings nodes are not affected.\n\nFixes the code by not using the potentially changed nominator, adds a test that reproduces the issue and updates the fuzz test to not always use denominator 1.",
 "commits": [
  {
   "sha": "d34560324296cd17619b561d1b044cf505a7a092",
   "date": "2026-09-17T08:56:54Z",
   "message": "crypto: Fix MuHash3072 division by itself"
  }
 ],
 "timeline": [],
 "labels_log": [
  {
   "t": "2026-09-17T11:59:04Z",
   "action": "labeled",
   "label": "Utils/log/libs",
   "who": "DrahtBot"
  }
 ],
 "state_log": [],
 "text_chars": 826,
 "text_tokens_estimate": 206,
 "changed_paths": [
  "src/crypto/muhash.cpp",
  "src/test/crypto_tests.cpp",
  "src/test/fuzz/muhash.cpp"
 ],
 "files": [
  {
   "path": "src/crypto/muhash.cpp",
   "add": 2,
   "del": 1
  },
  {
   "path": "src/test/crypto_tests.cpp",
   "add": 6,
   "del": 0
  },
  {
   "path": "src/test/fuzz/muhash.cpp",
   "add": 1,
   "del": 0
  }
 ],
 "test_lines": 7,
 "git": {
  "head": "d34560324296cd17619b561d1b044cf505a7a092",
  "head_matches_backup": true,
  "base": "b8215855437288cac95c7fd5d41104c73c0f3495",
  "commits": [
   {
    "sha": "d345603242",
    "subject": "crypto: Fix MuHash3072 division by itself",
    "files": 3,
    "add": 9,
    "del": 1
   }
  ],
  "patch_truncated": false
 },
 "input_hash": "2aa140ec54a92e27",
 "extracted_at": "2026-09-17T16:15:31+00:00"
}