Описание
vyper performs incorrect topic logging in raw_log
Summary
Incorrect values can be logged when raw_log builtin is called with memory or storage arguments to be used as topics.
A contract search was performed and no vulnerable contracts were found in production. In particular, no uses of raw_log() were found at all in production; it is apparently not a well-known function.
Details
The build_IR function of the RawLog class fails to properly unwrap the variables provided as topics. Consequently, incorrect values are logged as topics.
PoC
Patches
Fixed in https://github.com/vyperlang/vyper/pull/3977.
Impact
Incorrect values can be logged which may result in unexpected behavior in client-side applications relying on these logs.
Пакеты
vyper
< 0.4.0
0.4.0
Связанные уязвимости
Vyper is a pythonic Smart Contract Language for the Ethereum virtual machine. In versions 0.3.10 and prior, incorrect values can be logged when `raw_log` builtin is called with memory or storage arguments to be used as topics. A contract search was performed and no vulnerable contracts were found in production. The `build_IR` function of the `RawLog` class fails to properly unwrap the variables provided as topics. Consequently, incorrect values are logged as topics. As of time of publication, no fixed version is available.