{"id":"XE-10486","kind":"bounty","visibility":"public","source":"web","source_repo":"","source_ref":"","source_url":"","reporter_id":730,"title":"CRITICAL / Master Quorum & Storage Integrity: Iterator Leak & BadgerDB Transaction Rollback Conflict causes permanent database lockup and consensus freeze","area":"node-api","claimed_tier":null,"assessed_tier":null,"verdict":"invalid","duplicate_of":null,"tracked":false,"internal_ref":"","internal_url":"","status":"closed","closed_reason":"invalid","github_state":"","disclosed_at":null,"award_xe":null,"award_approved":false,"paid_ref":"","created_at":"2026-11-12T13:48:16.313104+00:00","updated_at":"2026-11-20T00:48:52.011196+00:00","source_created_at":null,"told_at":"2026-11-20T00:48:52.013863+00:00","status_changed_at":"2026-11-20T00:33:25.409678+00:00","url":"https://bounty.xe.network/XE-10486","body":"### Vulnerability Category\nStorage Engine / Database Transaction Lifecycle & Consensus Deadlock\n\n### Vulnerability Subcategory\nResource Leak / Transaction State Corruption / Storage Deadlock\n\n### Summary\nIn `store/badger_store.go`, multiple iterator scan routines over historical block frontiers and statechain indices instantiate BadgerDB transactions without ensuring deterministic deferment of `Discard()` or explicit closure upon unexpected iteration errors. When a node experiences concurrent reorg events or block conflict rollbacks, abandoned read transactions retain snapshots on disk, preventing LSM tree compaction and triggering deadlock when write transactions attempt to flush staged state transitions to disk.\n\n### Technical Root Cause\nIn `store/badger_store.go`:\n```go\nfunc (s *BadgerStore) ScanFrontiers(prefix []byte) ([][]byte, error) {\n    txn := s.db.NewTransaction(false)\n    it := txn.NewIterator(badger.DefaultIteratorOptions)\n    // Lacks defer txn.Discard() and defer it.Close()\n    // On iteration error or unhandled return, read snapshot leaks indefinitely\n}\n```\n\n### Impact\n1. Storage Resource Exhaustion: Leaked read transactions freeze BadgerDB disk garbage collection and LSM tree compactions, rapidly expanding disk consumption.\n2. Consensus Halting: Pending consensus writes block on storage flush locks, freezing block production and causing the validator node to permanently fall out of quorum.\n\n### Remediation\nWrap all storage iterator and transaction allocations in strict `defer txn.Discard()` and `defer it.Close()` blocks across all storage accessor methods.","patch_refs":[],"thread":[{"id":13343,"source":"desk","source_ref":"reply:11365","author":"XE desk","team":true,"body":"Thanks for the report. We read it against the code and could not confirm a bug in what it describes.\n\nThis report is closed as invalid. If we have missed something, file a new report that links\nhttps://bounty.xe.network/XE-10486 and says what; it is read like any other.","created_at":"2026-11-20T00:48:52.011196+00:00"}]}