【24h】

Uncovering the Hidden Dangers: Finding Unsafe Go Code in the Wild

机译:揭开隐藏的危险:在野外寻找不安全的去代码

获取原文

摘要

The Go programming language aims to provide memory and thread safety through measures such as automated memory management with garbage collection and a strict type system. However, it also offers a way of circumventing this safety net through the use of the unsafe package. While there are legitimate use cases for unsafe, developers must exercise caution to avoid introducing vulnerabilities like buffer overflows or memory corruption in general. In this work, we present go-geiger, a novel tool for Go developers to quantify unsafe usages in a project's source code and all of its dependencies. Using go-geiger, we conducted a study on the usage of unsafe in the top 500 most popular open-source Go projects on GitHub, including a manual analysis of 1,400 code samples on how unsafe is used. From the projects using Go's module system, 38% directly contain at least one unsafe usage, and 91% contain at least one unsafe usage in the project itself or one of its transitive dependencies. Based on the usage patterns found, we present possible exploit vectors in different scenarios. Finally, we present go-safer, a novel static analysis tool to identify dangerous and common usage patterns that were previously undetected with existing tools.
机译:Go编程语言旨在通过具有垃圾收集的自动内存管理等措施提供内存和线程安全性和严格的类型系统。然而,它还提供了一种通过使用不安全的包来避免这种安全网的方法。虽然存在不安全的合法用例,但开发人员必须小心谨慎,以避免引入漏洞,如缓冲区溢出或内存损坏。在这项工作中,我们展示了Go-Geiger,这是一个新颖的Go开发人员的工具,可以在项目的源代码和所有依赖项中量化不安全的使用。使用Go-Geiger,我们对GITHUB中最受欢迎的500个最受欢迎的开源GO项目的不安全的使用进行了研究,包括手动分析1,400个代码样本,用于如何不安全。从使用Go的模块系统的项目,38%直接包含至少一个不安全的使用,91%包含项目本身中的至少一个不安全的使用或其传递依赖项之一。基于找到的使用模式,我们在不同场景中提出了可能的利用矢量。最后,我们呈现Go-Safer,这是一个新的静态分析工具,以确定先前未检测到现有工具的危险和常用使用模式。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号