The Move language's reference security module has discovered an integer overflow vulnerability that could lead to a DoS attack.

A new integer overflow vulnerability found in the Move language's reference safety module

Recently, during an in-depth study of the Move language, we discovered a new integer overflow vulnerability. This vulnerability exists in the reference safety verification process, and its triggering process is quite interesting. This article will analyze this vulnerability in depth and explore some background knowledge of the Move language.

The Move language performs code unit validation before executing bytecode, which is divided into four steps. This vulnerability occurs in the reference_safety step. This step is responsible for verifying the safety of references, including checking for dangling references, whether mutable reference access is safe, and whether global storage reference access is safe, etc.

Numen Cyber exclusively discovered another high-risk vulnerability in the move language

The entry function for citation security verification will call analyze_function to verify each basic block. A basic block refers to a sequence of code that has no branch instructions except for entry and exit. The Move language identifies basic blocks by traversing the bytecode, looking for all branch instructions and loop instruction sequences.

Numen Cyber exclusively discovered another high-risk vulnerability in the move language

The Move language supports two types of references: immutable references (&) and mutable references (&mut). The reference safety module verifies the legality of all reference operations by scanning the bytecode instructions of basic blocks in functions. The verification process uses the AbstractState structure, which contains the borrow graph and locals, to ensure the safety of references within the function.

Numen Cyber exclusive discovery of another critical vulnerability in the move language

The vulnerability occurs in the join_ function. When the sum of the parameter length and the local variable length exceeds 256, it causes an integer overflow because the iter_locals() function returns an iterator of u8 type. Although Move has a process to check the number of locals, the check bounds module only verifies the locals and does not include the parameter length.

Numen Cyber exclusively discovered another high-risk vulnerability in the move language

This integer overflow may lead to a Denial of Service (DoS) attack. When there is a loop code block and the overflow alters the block's state, the new locals map differs from the previous one. When the execute_block function is executed again and the index that the instruction needs to access does not exist in the new AbstractState locals map, it will result in a DoS.

Numen Cyber exclusively discovered another high-risk vulnerability in the move language

We have provided a reproducible PoC in git. The code block in this PoC contains an unconditional branch instruction that jumps back to the first instruction every time the last instruction is executed, thus repeatedly calling the execute_block and join functions.

Numen Cyber exclusively discovers another critical vulnerability in the Move language

This vulnerability demonstrates that even a language focused on security like Move may have security risks. The importance of code auditing is self-evident, and programmers are bound to have oversights. As leaders in the security research of the Move language, we will continue to delve into the security issues of Move.

We recommend that Move language designers add more check codes at runtime to prevent unexpected situations. Currently, Move mainly conducts security checks during the verify phase, but this may not be enough. Once verification is bypassed, the lack of sufficient security reinforcement during the execution phase could lead to more serious issues.

Numen Cyber exclusively discovered another high-risk vulnerability in the move language

Numen Cyber Exclusive Discovery: Another Critical Vulnerability Found in Move Language

Numen Cyber's exclusive discovery of another high-risk vulnerability in the move language

Numen Cyber exclusively discovered another high-risk vulnerability in the move language

Numen Cyber exclusively discovered another critical vulnerability in the move language

Numen Cyber has exclusively discovered another critical vulnerability in the move language

Numen Cyber exclusively discovered another critical vulnerability in the move language

Numen Cyber exclusive discovery of another high-risk vulnerability in the move language

Numen Cyber exclusively discovered another critical vulnerability in the move language

MOVE1.25%
View Original
This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
  • Reward
  • 5
  • Repost
  • Share
Comment
0/400
GasFeeWhisperervip
· 21h ago
move has crashed again
View OriginalReply0
StopLossMastervip
· 22h ago
It's another hole dug by our own people.
View OriginalReply0
LiquidationWatchervip
· 22h ago
There are vulnerabilities again.
View OriginalReply0
ZKProofEnthusiastvip
· 22h ago
This bug has escalated.
View OriginalReply0
ZenMinervip
· 22h ago
It's toxic, move is going to patch again.
View OriginalReply0
Trade Crypto Anywhere Anytime
qrCode
Scan to download Gate app
Community
English
  • 简体中文
  • English
  • Tiếng Việt
  • 繁體中文
  • Español
  • Русский
  • Français (Afrique)
  • Português (Portugal)
  • Bahasa Indonesia
  • 日本語
  • بالعربية
  • Українська
  • Português (Brasil)