Cross-file intelligent contract reentrant vulnerability defense method and device
The invention discloses a cross-file intelligent contract reentrant vulnerability defense method, which comprises the following steps: when a to-be-detected intelligent contract enters a sensitive area determined by adopting a preset method, locking a sensitive variable of the sensitive area, the se...
Saved in:
Main Authors | , , |
---|---|
Format | Patent |
Language | Chinese English |
Published |
20.12.2019
|
Subjects | |
Online Access | Get full text |
Cover
Loading…
Summary: | The invention discloses a cross-file intelligent contract reentrant vulnerability defense method, which comprises the following steps: when a to-be-detected intelligent contract enters a sensitive area determined by adopting a preset method, locking a sensitive variable of the sensitive area, the sensitive area comprising sensitive variables which can be read and written by functions in differentcode files; and when the to-be-detected smart contract leaves the sensitive area, performing unlocking processing on the sensitive variable. According to the defense method, when the to-be-detected smart contract enters the sensitive area, the sensitive variable is locked to prevent other smart contract files from tampering the sensitive variable, and when the to-be-detected smart contract leavesthe sensitive area, the sensitive variable is unlocked to execute other non-sensitive area services, thereby realizing defense of the reentrant vulnerability of the to-be-detected smart contract.
本发明公开了一种跨文件智能合约可重入漏洞防御方法,包括:当所 |
---|---|
Bibliography: | Application Number: CN201910876109 |