Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

chainx-org/chainx
develop-2022 @ 572559f
25
Fixes
0
CVEs
HIGH
Peak severity
Highlights
Auth Bypass: 7 prior fixes. Scrutinize any change in this area.
xrml/xbridge/bitcoin: most-fixed (3 issues). Treat as high-risk during review.
18 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Auth Bypass: The Bitcoin bridge components repeatedly suffered from authorization bypasses due to incorrect signature verification indexes, missing non-zero signature checks, and failure to match the applied signatures against the originally proposed withdrawal transactions. Developers must strictly enforce multi-signature verification thresholds.
Denial of Service: Mathematical calculations in token reward distribution and market depth lookups are prone to integer overflows and underflows, triggering runtime panics that can halt the chain. Arithmetic calculations must be explicitly guarded with checked operations.
Logic Error: Inadequate input checks on target accounts in staking operations (such as nomination, unnomination, and claims) allowed corrupted staking states when accounts were not active staking intentions. Target states must be strictly validated before modifying pool states.