🇰🇷 한글 설명
CometBFT의 mempool 내 리스트와 맵 데이터 구조가 동기화되지 않아 동일한 트랜잭션이 중복 저장되는 취약점입니다. 이로 인해 중복된 트랜잭션이 메모리에서 제거되지 않고 계속 쌓이게 되어 노드의 자원을 고갈시킬 수 있습니다.
💡 쉬운 설명
데이터를 관리하는 두 장부가 서로 맞지 않아, 한 번 들어온 데이터가 삭제되지 않고 계속 쌓이는 문제입니다. 공격자가 이 점을 이용해 가짜 데이터를 계속 집어넣으면 컴퓨터가 과부하로 멈출 수 있습니다.
🇺🇸 원문 (English)
CometBFT is a Byzantine Fault Tolerant (BFT) middleware that takes a state transition machine and replicates it on many machines. The mempool maintains two data structures to keep track of outstanding transactions: a list and a map.
These two data structures are supposed to be in sync all the time in the sense that the map tracks the index (if any) of the transaction in the list. In `v0.37.0`, and `v0.37.1`, as well as in `v0.34.28`, and all previous releases of the CometBFT repo2, it is possible to have them out of sync. When this happens, the list may contain several copies of the same transaction. Because the map tracks a single index, it is then no longer possible to remove all the copies of the transaction from the list. This happens even if the duplicated transaction is later committed in a block. The only way to remove the transaction is by restarting the node.
The above problem can be repeated on and on until a sizable number of transactions are stuck in the mempool, in order to try to bring down the target node. The problem is fixed in releases `v0.34.29` and `v0.37.2`. Some workarounds are available. Increasing the value of `cache_size` in `config.toml` makes it very difficult to effectively attack a full node. Not exposing the transaction submission RPC's would mitigate the probability of a successful attack, as the attacker would then have to create a modified (byzantine) full node to be able to perform the attack via p2p.
📍 영향받는 시스템
CometBFT v0.37.0, v0.37.1, v0.34.28 및 이전 모든 버전
⚔️ 공격 벡터
중복 트랜잭션을 지속적으로 전송하여 mempool 내에 제거되지 않는 트랜잭션을 축적함으로써 노드를 마비시킴
🛡️ 대응 방법
CometBFT를 v0.34.29 또는 v0.37.2 이상의 버전으로 업데이트하거나, config.toml에서 cache_size를 늘리고 RPC 노출을 제한함
🔧 검증 코드
명령어 결과에 취약한 버전(0.37.0, 0.37.1, 0.34.28 등)이 출력되면 해당 시스템은 취약한 상태입니다.
grep -E 'cometbft' <(dpkg -l 2>/dev/null || rpm -qa) | grep -E '0.37.[01]|0.34.28'