已知bug列表——Solidity中文文档(12)

逆向实战:手把手教你用Frida绕过Flutter App的SSL Pinning(附脚本修改指南) 本文详细介绍了如何利用Frida工具绕过Flutter应用的SSL Pinning保护机制,包括静态分析定位关键函数、定制Frida Hook脚本以及流量捕获的完整解决方案。通过实战案例和脚本修改指南,帮助安全研究人员有效应对Flutter应用的安全挑战,特别适用于安卓平台的逆向工程和抓包需求。 阅读详情

image

写在前面:HiBlock区块链社区成立了翻译小组,翻译区块链相关的技术文档及资料,本文为Solidity文档翻译的第十二部分《已知bug列表》,特发布出来邀请solidity爱好者、开发者做公开的审校,您可以添加微信baobaotalk_com,验证输入“solidity”,然后将您的意见和建议发送给我们,也可以在文末“留言”区留言,有效的建议我们会采纳及合并进下一版本,同时将送一份小礼物给您以示感谢。

在下面,你可以找到一个 JSON 格式的列表,上面列出了 Solidity 编译器上一些已知的安全相关的 bug。 该文件被放置于 Github 仓库(https://github.com/ethereum/solidity/blob/develop/docs/bugs.json) 。 该列表可以追溯到 0.3.0 版本,只在此版本之前存在的 bug 没有被列入。

这里,还有另外一个 bugs_by_version.json 文件(https://github.com/ethereum/solidity/blob/develop/docs/bugs_by_version.json)。 该文件可用于查询特定的某个编译器版本会受哪些 bug 影响。

合约的源文件检查工具以及其他与合约交互的工具,需基于以下规则查阅上述 bug 列表文件:

  • 如果合约是用每日构建版本的编译器编译,而不是发布版本的编译器,那就有点可疑了。上述bug列表不跟踪未发布或每日构建版本的编译器。

  • 如果一个合约并不是由它被创建时点的最新版本编译器所编译的,那么这也是值得怀疑的。对于由其他合约创建的合约,您必须沿着创建链追溯最初交易,并使用该交易的日期作为创建日期。

  • 高度可疑的情况是,如果一份合约由一个包含已知 bug 的编译器编译,但在合约创建时,已修复了相应 bug 的新版编译器已经发布了。

下面这份包含已知 bug 的 JSON 文件实际上是一个对象数组,每个对象对应一个 bug,并包含以下的 keys :

name

赋予该 bug 的唯一的名字

summary

对该 bug 的简要描述

description

对该 bug 的详细描述

link

包含更多详尽信息的链接,可选

introduced

第一个包含该 bug 的编译器的发布版本,可选

fixed

第一个不再包含该 bug 的编译器的发布版本

publish

该 bug 被公开的日期,可选

severity

bug 的严重性: very low, low, medium, high。综合考虑了在合约测试中的可发现性、发生的可能性和被利用后的潜在损害。

conditions

触发该 bug 所需满足的条件。当前,这是一个包含了 optimizer 布尔值的对象,这意味着只有打开优化器选项时,才会触发该 bug。 如果没有给出任何条件,则意味着此 bug 始终存在。

[
   {
       "name": "OneOfTwoConstructorsSkipped",
       "summary": "If a contract has both a new-style constructor (using the constructor keyword) and an old-style constructor (a function with the same name as the contract) at the same time, one of them will be ignored.",
       "description": "If a contract has both a new-style constructor (using the constructor keyword) and an old-style constructor (a function with the same name as the contract) at the same time, one of them will be ignored. There will be a compiler warning about the old-style constructor, so contracts only using new-style constructors are fine.",
       "introduced": "0.4.22",
       "fixed": "0.4.23",
       "severity": "very low"
   },
   {
       "name": "ZeroFunctionSelector",
       "summary": "It is possible to craft the name of a function such that it is executed instead of the fallback function in very specific circumstances.",
       "description": "If a function has a selector consisting only of zeros, is payable and part of a contract that does not have a fallback function and at most five external functions in total, this function is called instead of the fallback function if Ether is sent to the contract without data.",
       "fixed": "0.4.18",
       "severity": "very low"
   },
   {
       "name": "DelegateCallReturnValue",
       "summary": "The low-level .delegatecall() does not return the execution outcome, but converts the value returned by the functioned called to a boolean instead.",
       "description": "The return value of the low-level .delegatecall() function is taken from a position in memory, where the call data or the return data resides. This value is interpreted as a boolean and put onto the stack. This means if the called function returns at least 32 zero bytes, .delegatecall() returns false even if the call was successuful.",
       "introduced": "0.3.0",
       "fixed": "0.4.15",
       "severity": "low"
   },
   {
       "name": "ECRecoverMalformedInput",
       "summary": "The ecrecover() builtin can return garbage for malformed input.",
       "description": "The ecrecover precompile does not properly signal failure for malformed input (especially in the 'v' argument) and thus the Solidity function can return data that was previously present in the return area in memory.",
       "fixed": "0.4.14",
       "severity": "medium"
   },
   {
       "name": "SkipEmptyStringLiteral",
       "summary": "If \"\" is used in a function call, the following function arguments will not be correctly passed to the function.",
       "description": "If the empty string literal \"\" is used as an argument in a function call, it is skipped by the encoder. This has the effect that the encoding of all arguments following this is shifted left by 32 bytes and thus the function call data is corrupted.",
       "fixed": "0.4.12",
       "severity": "low"
   },
   {
       "name": "ConstantOptimizerSubtraction",
       "summary": "In some situations, the optimizer replaces certain numbers in the code with routines that compute different numbers.",
       "description": "The optimizer tries to represent any number in the bytecode by routines that compute them with less gas. For some special numbers, an incorrect routine is generated. This could allow an attacker to e.g. trick victims about a specific amount of ether, or function calls to call different functions (or none at all).",
       "link": "https://blog.ethereum.org/2017/05/03/solidity-optimizer-bug/",
       "fixed": "0.4.11",
       "severity": "low",
       "conditions": {
           "optimizer": true
       }
   },
   {
       "name": "IdentityPrecompileReturnIgnored",
       "summary": "Failure of the identity precompile was ignored.",
       "description": "Calls to the identity contract, which is used for copying memory, ignored its return value. On the public chain, calls to the identity precompile can be made in a way that they never fail, but this might be different on private chains.",
       "severity": "low",
       "fixed": "0.4.7"
   },
   {
       "name": "OptimizerStateKnowledgeNotResetForJumpdest",
       "summary": "The optimizer did not properly reset its internal state at jump destinations, which could lead to data corruption.",
       "description": "The optimizer performs symbolic execution at certain stages. At jump destinations, multiple code paths join and thus it has to compute a common state from the incoming edges. Computing this common state was simplified to just use the empty state, but this implementation was not done properly. This bug can cause data corruption.",
       "severity": "medium",
       "introduced": "0.4.5",
       "fixed": "0.4.6",
       "conditions": {
           "optimizer": true
       }
   },
   {
       "name": "HighOrderByteCleanStorage",
       "summary": "For short types, the high order bytes were not cleaned properly and could overwrite existing data.",
       "description": "Types shorter than 32 bytes are packed together into the same 32 byte storage slot, but storage writes always write 32 bytes. For some types, the higher order bytes were not cleaned properly, which made it sometimes possible to overwrite a variable in storage when writing to another one.",
       "link": "https://blog.ethereum.org/2016/11/01/security-alert-solidity-variables-can-overwritten-storage/",
       "severity": "high",
       "introduced": "0.1.6",
       "fixed": "0.4.4"
   },
   {
       "name": "OptimizerStaleKnowledgeAboutSHA3",
       "summary": "The optimizer did not properly reset its knowledge about SHA3 operations resulting in some hashes (also used for storage variable positions) not being calculated correctly.",
       "description": "The optimizer performs symbolic execution in order to save re-evaluating expressions whose value is already known. This knowledge was not properly reset across control flow paths and thus the optimizer sometimes thought that the result of a SHA3 operation is already present on the stack. This could result in data corruption by accessing the wrong storage slot.",
       "severity": "medium",
       "fixed": "0.4.3",
       "conditions": {
           "optimizer": true
       }
   },
   {
       "name": "LibrariesNotCallableFromPayableFunctions",
       "summary": "Library functions threw an exception when called from a call that received Ether.",
       "description": "Library functions are protected against sending them Ether through a call. Since the DELEGATECALL opcode forwards the information about how much Ether was sent with a call, the library function incorrectly assumed that Ether was sent to the library and threw an exception.",
       "severity": "low",
       "introduced": "0.4.0",
       "fixed": "0.4.2"
   },
   {
       "name": "SendFailsForZeroEther",
       "summary": "The send function did not provide enough gas to the recipient if no Ether was sent with it.",
       "description": "The recipient of an Ether transfer automatically receives a certain amount of gas from the EVM to handle the transfer. In the case of a zero-transfer, this gas is not provided which causes the recipient to throw an exception.",
       "severity": "low",
       "fixed": "0.4.0"
   },
   {
       "name": "DynamicAllocationInfiniteLoop",
       "summary": "Dynamic allocation of an empty memory array caused an infinite loop and thus an exception.",
       "description": "Memory arrays can be created provided a length. If this length is zero, code was generated that did not terminate and thus consumed all gas.",
       "severity": "low",
       "fixed": "0.3.6"
   },
   {
       "name": "OptimizerClearStateOnCodePathJoin",
       "summary": "The optimizer did not properly reset its internal state at jump destinations, which could lead to data corruption.",
       "description": "The optimizer performs symbolic execution at certain stages. At jump destinations, multiple code paths join and thus it has to compute a common state from the incoming edges. Computing this common state was not done correctly. This bug can cause data corruption, but it is probably quite hard to use for targeted attacks.",
       "severity": "low",
       "fixed": "0.3.6",
       "conditions": {
           "optimizer": true
       }
   },
   {
       "name": "CleanBytesHigherOrderBits",
       "summary": "The higher order bits of short bytesNN types were not cleaned before comparison.",
       "description": "Two variables of type bytesNN were considered different if their higher order bits, which are not part of the actual value, were different. An attacker might use this to reach seemingly unreachable code paths by providing incorrectly formatted input data.",
       "severity": "medium/high",
       "fixed": "0.3.3"
   },
   {
       "name": "ArrayAccessCleanHigherOrderBits",
       "summary": "Access to array elements for arrays of types with less than 32 bytes did not correctly clean the higher order bits, causing corruption in other array elements.",
       "description": "Multiple elements of an array of values that are shorter than 17 bytes are packed into the same storage slot. Writing to a single element of such an array did not properly clean the higher order bytes and thus could lead to data corruption.",
       "severity": "medium/high",
       "fixed": "0.3.1"
   },
   {
       "name": "AncientCompiler",
       "summary": "This compiler version is ancient and might contain several undocumented or undiscovered bugs.",
       "description": "The list of bugs is only kept for compiler versions starting from 0.3.0, so older versions might contain undocumented bugs.",
       "severity": "high",
       "fixed": "0.3.0"
   }

]

延伸阅读:智能合约-Solidity官方文档(1)

安装Solidity编译器-Solidity官方文档(2)

根据例子学习Solidity-Solidity官方文档(3)

深入理解Solidity之源文件及合约结构——Solidity中文文档(4)

安全考量——Solidity中文文档(5)

合约的元数据——Solidity中文文档(6)

应用二进制接口(ABI) 说明——Solidity中文文档(7)

使用编译器——Solidity中文文档(8)

Yul语言及对象说明——Solidity中文文档(9)

风格指南——Solidity中文文档(10)

通用模式——Solidity中文文档(11)

点击“阅读原文”即可查看完整中文文档

image

注:本文为solidity翻译的第十二部分《已知bug列表》,特发布出来邀请solidity爱好者、开发者做公开的审校,您可以添加微信baobaotalk_com,验证输入“solidity”,然后将您的意见和建议发送给我们,也可在文末“留言”区留言,或通过原文链接访问我们的Github。有效的建议我们会收纳并及时改进,同时将送一份小礼物给您以示感谢。

本文内容来源于HiBlock区块链社区翻译小组,感谢全体译者的辛苦工作。点击“阅读原文”即可查看完整中文文档。

以下是我们的社区介绍,欢迎各种合作、交流、学习:)

image

Far planner代码系列(2) graph_decoder系列(2) 承接上文 我们接着来看decoder_node.cpp的代码部分 void GraphDecoder::Init() { /* initialize subscriber and publisher */ //graph_sub_ 订阅节点/robot_vgraph 其类型是visibility_graph_msg/Graph的消息 graph_sub_ = nh.subscribe("/robot_vgrap... 阅读详情

相关推荐

Labelme AI-Polygon闪退排查与修复指南

本文详细介绍了Labelme AI-Polygon功能闪退问题的排查与修复方法,包括环境配置检查、模型路径设置、依赖库版本控制等关键步骤。通过系统性的解决方案和实用技巧,帮助用户快速解决闪退问题,确保数据标注工作的高效进行。

weixin_29311017的博客 140

Solidity官方文档:已知bug列表

最近加入了Solidity的官方文档的中文翻译小组,以下是我们翻译的文章,可到我们的官网查看最新的更新:https://solidity-cn.readthedocs.io/zh/develop已知bug列表在下面,你可以找到一个 JSON 格式的列表,上面列出了 Solidity 编译器上一些已知的安全相关的 bug。 该文件被放置于 Github 仓库 。 该列表可以追溯到 0.3.0 版本,

点火三周的专栏 1524

单精度浮点数存储、双精度浮点数存储

单精度浮点数存储、双精度浮点数存储

fancynthia的博客 1323

在json里查看Solidity的版本

智能合约使用truffle compile、npx hardhat compile、brownie compile这3种工具编译后,都会得到一个json文件,该json文件有合约的abi、bytecode、compiler等字段。 - abi 应用程序二进制接口,是合约提供外界调用的接口。 - bytecoe 字节码,合约代码编译之后得到的字节码,最后会部署到链上。 - compiler 是Solidtiy的编译信息,包含链分叉的版本、solc版本、是否优化。

sanqima的专栏 3615

【KDD2024】ShapeFormer:用于多元时间序列分类的Shapelet Transformer

多元时间序列分类(MTSC)因其在现实世界中的广泛应用而吸引了大量研究关注。最近,Transformer在MTSC中取得了先进的性能。然而,

m0_52597077的博客 4748

如何使用 Ansys OptiSlang 同时运行多个参数化设计研究

了解如何通过使用 OptiSLang 同时运行多个参数化设计研究来提高工作效率。

jkh920184196的博客 2394

判断String是否为空的注意事项

 首先需要注意一点,笔者在这里不将"s==nul"l的情况视为"s是空字符串"。 一,初学者容易出现的错误 1、用if(s==""){}判断s是否为空。这种方式是最低级的错误同时也是最隐蔽的错误,说它低级是因为这样构造语句的程序员对String了解甚少,说它隐蔽是因为这条语句不仅不会发生编译错误而且很多新手还会认为这样判断完全正确,殊不知存在严重的bug。先看下面的示例:示

lubiaopan的专栏 1万+

Win10系统内存占用异常飙升?三步排查法快速定位问题根源

本文针对Win10系统内存占用异常飙升问题,提供了一套三步排查法。首先利用任务管理器和资源监视器进行深度系统体检,定位隐形内存消耗者;其次通过干净启动和禁用非必要后台服务,揪出导致内存泄漏的第三方软件或驱动;最后进行终极深度清理,包括检查内存完整性、调整虚拟内存设置以及更新关键驱动程序,帮助用户快速恢复系统流畅运行。

weixin_29251567的博客 200

逻辑陷阱型蜜罐合约

蜜罐是传统安全领域中的一个概念,通常指安全人员设置一些陷阱(比较明显的漏洞),让攻击者自己掉入我们设置好的陷阱中,以便安全人员分析攻击者的作恶手法。蜜罐合约(HoneyPots Contract)也是类似的概念,但对象变了,一般指合约开发者设置了看似容易获利的合约逻辑,但其实是陷阱,普通用户观察合约,发现有利可图,便与蜜罐合约交互,结果发现交互的资产无法被自己提出。蜜罐合约在中文圈子有时也称为貔貅...

weixin_30230009的博客 3321

STM32驱动LED矩阵:IS31FL3731与查理复用技术实践

LED矩阵显示是嵌入式系统中常见的人机交互方式,其核心在于高效的驱动技术。查理复用(Charlieplexing)作为一种创新的矩阵扫描方式,通过引脚复用技术,用N个引脚驱动N²-N个LED,大幅提升了硬件资源利用率。IS31FL3731驱动芯片集成了这一技术,配合STM32F410RB微控制器的强大性能,可实现144个LED的精准控制。这种组合在艺术装置、信息展示等场景中展现出独特优势,既能呈现丰富的视觉效果,又能通过内置PWM调光实现256级亮度控制。通过I2C接口通信,开发者可以轻松实现字符显示、图像

weixin_29193359的博客 280

Decoder如何工作、Transformer如何训练、以及exposure bias问题

1、结合图文描述Decoder中各个模块是什么,以及是如何工作的。2、transformer是如何训练的。3、exposure bias问题造成的原因及解决方法

m0_59113542的博客 3346

BUG列表以及解决办法

提供了各种bug,以及解决办法,作者会不断进行完善.希望各位在程序的路上越走越远,希望本文能够帮助你, 希望项目永远没有bug,如果有的话,盘他; TimeoutException WifiStateMachine:判断网络状态 解决方案:添加权限 FastThread: did not receive expected priority boost:傻瓜:没有收到预期的优先级提升 解决方案:...

weixin_43603192的博客 2604

实战落地!Python抓取股票历史数据:开盘/收盘/成交量全维度爬取(附数据清洗+可视化)

股票历史数据抓取的核心是“数据准确性+完整性”,网页爬取适合小批量、个性化需求,API调用适合批量、标准化需求。多市场数据抓取:适配港股(00700.HK)、美股(AAPL)的抓取逻辑;高频数据抓取:抓取分钟级、小时级行情数据,用于短线量化策略;财务数据扩展:抓取市盈率、市净率、净利润等财务指标,结合价格数据做基本面分析;量化策略回测:将清洗后的数据接入Backtrader、VNPY等量化框架,验证策略有效性。

专注于Python爬虫开发,分享爬虫技巧、项目实战与反爬经验,使用Scrapy、BeautifulSoup等工具,解决数据抓取难题。 1740

安全考量——Solidity中文文档(5)

本文为solidity翻译的第五部分《安全考量》

HiBlock的博客 631

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

华为的C语言编程规范.pdf

华为技术有限公司内部技术规范。本规范制定了编写C语言程序的基本原则、规则和建议。从代码的清晰、简洁、可测试、安全、程序效率、可移植各个方面对C语言编程作出了具体指导。

Solidity中文文档----源文件布局以及合约结构

原文地址:http://solidity.readthedocs.io/en/latest/solidity-in-depth.html本节提供您需要了解的有关Solidity的所有信息。 如果这里缺少某些东西,请与Gitter联系或者在Github上发出pull请求。一、纯文件的布局源文件可以包含任意数量的智能合约定义,包括指令和pragma指令。pragma版本源文件可以使用所谓的pragma版

LYH的博客 1696

霍尼韦尔SoftMaster使用说明

霍尼韦尔SoftMaster使用说明

Solidity中文文档(1)-HiBlock区块链社区翻译小组

Solidity 是一门面向合约的、为实现智能合约而创建的高级编程语言。这门语言受到了 C++,Python 和 Javascript 语言的影响,设计的目的是能在以太坊虚拟机(EVM)上运行。Solidity 是静态类型语言,支持继承、库和复杂的用户定义类型等特性。下面您将会看到,使用 Solidity 语言,可以为投票、众筹、秘密竞价(盲拍)、多重签名的钱包以及其他应用创建合约。注解目前尝试 ...

姜信宝 Bob Jiang的专栏 734

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

贡献方式及常见问题——Solidity中文文档(13)

2019独角兽企业重金招聘Python工程师标准>>> ...

weixin_34364135的博客 497

Solidity 中文文档 —— 第一章:Introduction to Smart Contracts

第一章:智能合约简介 粗略地翻译了 Ethereum 的智能合约开发语言的文档:Solidity。欢迎转载,注明出处。 有任何问题请联系我,本人微信:wx1076869692,更多详情见文末。 我是 JoiT,coding monkey 。最早做 web 开发,用 .net mvc 和 python flask/DJango,后来做微信公众号和小程序开发,现在探

JoiT 1192

Solidity注释不是废话:Natspec规范与合约安全实践

智能合约注释是保障链上逻辑可理解、可验证、可审计的关键基础设施。从基础的单行/块注释语义漂移,到NatSpec标准驱动的机器可读文档生成,注释已演变为连接开发者、调用者与安全工具链的结构化元数据。其核心价值在于将业务意图、安全约束和执行边界显式编码,避免因上下文缺失导致的权限误判、单位混淆或重入漏洞。在DeFi、NFT等高危场景中,高质量注释直接支撑Etherscan用户提示、Slither自动化审计联动及CI/CD阶段的合规校验。本文聚焦Solidity注释工程化落地,深入解析Natspec字段规范、注释

weixin_34126557的博客 230

Solidity合约记录——(一)如何寻找以太坊真实Solidity源码

在自主学习Solidity智能合约的过程中,第一份入手资料无疑是官方文档。感谢前辈们还能提供出文档的中文翻译,作为我入门的第一手资料;文末附上有用的学习链接{持续更新中} 阅读完基础文档同时上手合约后,没有人带路的感觉有点迷茫。有幸找到了以太坊的区块链浏览器:https://etherscan.io/ 展示一下首页: 浏览器右上角有搜索框,可以查看地址、交易hash、区块、Token代...

weixin_33860553的博客 393

Solidity理论知识

12

zzz19920821的博客 600
上一篇: 【ERC875】HiBlock黑客马拉松门票从定制到编码实现
下一篇: 贡献方式及常见问题——Solidity中文文档(13)
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值