Background: With the proliferation of crowd-sourced developer forums, software developers are increasingly sharing more coding solutions to programming problems with others in forums. The decentralized nature of knowledge sharing on sites has raised the concern of sharing security vulnerable code, which then can be reused into mission critical software systems - making those systems vulnerable in the process. Collaborative editing has been introduced in forums like Stack Overflow to improve the quality of the shared contents. Aim: In this paper, we investigate whether code editing can mitigate shared vulnerable code examples by analyzing IoT code snippets and their revisions in three Stack Exchange sites: Stack Overflow, Arduino, and Raspberry Pi. Method:We analyze the vulnerabilities present in shared IoT C/C++ code snippets, as C/C++ is one of the most widely used languages in mission-critical devices and low-powered IoT devices. We further analyse the revisions made to these code snippets, and their effects. Results: We find several vulnerabilities such as CWE 788 - Access of Memory Location After End of Buffer, in 740 code snippets . However, we find the vast majority of posts are not revised, or revisions are not made to the code snippets themselves (598 out of 740). We also find that revisions are most likely to result in no change to the number of vulnerabilities in a code snippet rather than deteriorating or improving the snippet. Conclusions: We conclude that the current collaborative editing system in the forums may be insufficient to help mitigate vulnerabilities in the shared code.
翻译:随着众源开发者论坛的增多,软件开发者越来越多地在论坛中与其他人分享更多编码解决编程问题的办法。网站知识共享的分散性质使人们更加关注共享安全脆弱代码的问题,然后这些代码可以被重新用于任务关键软件系统,使这些系统在此过程中变得脆弱。在Stack Overflow等论坛中采用了协作编辑,以提高共享内容的质量。目标:在本文件中,我们通过分析IOT代码编辑器及其在三个 Stack Exchange Exchange 网站(Stack Overflow, Arduino, 和 Raspberry Pi)的修改,来调查代码编辑是否可以减少共享的脆弱代码实例。 方法:我们分析了共享的 IOT C/C++ 代码元代码中的弱点,然后可以被重新用于任务关键装置和低功率 IOT 装置中最广泛使用的语言之一。我们进一步分析了这些代码拼图的修改及其影响。结果:我们发现一些弱点,如CWE 788 - 在Buffer 之后的记忆定位点,在740 代码中,在740个代码中, Arberry bremebregimpterpet the made made made made made made the made the made made made the made made made made made made the made the made made made to made made.