跟踪系统bug:为什么缓冲区溢出仍然存在?

C. Owen
{"title":"跟踪系统bug:为什么缓冲区溢出仍然存在?","authors":"C. Owen","doi":"10.1145/1294046.1294112","DOIUrl":null,"url":null,"abstract":"A buffer overrun is caused by the limited size of a string variable's allocated space and the unlimited size of the actual string that is stored in the space. In the C programming language, it is the programmer's responsibility to make sure the actual string size does not exceed the size of the space allocated for it. However, programmers sometimes fail to put in the necessary checks for string size. It is possible, when programming in C, to write past the end of the current string and into the allocated space for an entirely different variable. The affected variable may or may not be another string. However, the integrity of both variables will be compromised. This paper will present the results of an experiment which shows exactly what happens when strings and other variables are compromised in this way. Writing beyond the end of a string allocation seems like a trivial problem. These faults should be easy to find and fix. However, in reality, they are nearly impossible to find in many situations. The experiment makes the problem very clear so that everyone will understand why these faults are not easy to find and fix before they cause serious problems. Since this is a C programming language problem, and both Windows and Unix operating systems are written mostly in C, many system errors may be a result of this problem. Understanding the problem can save countless hours in system debugging.","PeriodicalId":277737,"journal":{"name":"Proceedings of the 35th annual ACM SIGUCCS fall conference","volume":"8 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2007-10-07","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Tracking system bugs: why are buffer overruns still around?\",\"authors\":\"C. Owen\",\"doi\":\"10.1145/1294046.1294112\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"A buffer overrun is caused by the limited size of a string variable's allocated space and the unlimited size of the actual string that is stored in the space. In the C programming language, it is the programmer's responsibility to make sure the actual string size does not exceed the size of the space allocated for it. However, programmers sometimes fail to put in the necessary checks for string size. It is possible, when programming in C, to write past the end of the current string and into the allocated space for an entirely different variable. The affected variable may or may not be another string. However, the integrity of both variables will be compromised. This paper will present the results of an experiment which shows exactly what happens when strings and other variables are compromised in this way. Writing beyond the end of a string allocation seems like a trivial problem. These faults should be easy to find and fix. However, in reality, they are nearly impossible to find in many situations. The experiment makes the problem very clear so that everyone will understand why these faults are not easy to find and fix before they cause serious problems. Since this is a C programming language problem, and both Windows and Unix operating systems are written mostly in C, many system errors may be a result of this problem. Understanding the problem can save countless hours in system debugging.\",\"PeriodicalId\":277737,\"journal\":{\"name\":\"Proceedings of the 35th annual ACM SIGUCCS fall conference\",\"volume\":\"8 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2007-10-07\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the 35th annual ACM SIGUCCS fall conference\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/1294046.1294112\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 35th annual ACM SIGUCCS fall conference","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/1294046.1294112","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

缓冲区溢出是由字符串变量分配的空间的大小有限和存储在空间中的实际字符串的大小无限引起的。在C编程语言中,程序员有责任确保实际字符串大小不超过为其分配的空间大小。然而,程序员有时无法对字符串大小进行必要的检查。在C语言中编程时,有可能将当前字符串后面的内容写入为完全不同的变量分配的空间中。受影响的变量可能是也可能不是另一个字符串。然而,这两个变量的完整性将受到损害。本文将展示一个实验的结果,该实验显示了当字符串和其他变量以这种方式受到损害时会发生什么。在字符串分配结束后写入似乎是一个微不足道的问题。这些错误应该很容易发现和修复。然而,在现实中,在许多情况下,它们几乎是不可能找到的。这个实验让问题变得非常清晰,这样每个人都能理解为什么这些故障在引起严重问题之前不容易被发现和修复。由于这是一个C编程语言问题,而Windows和Unix操作系统大部分都是用C编写的,因此这个问题可能会导致许多系统错误。了解问题可以在系统调试中节省无数的时间。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Tracking system bugs: why are buffer overruns still around?
A buffer overrun is caused by the limited size of a string variable's allocated space and the unlimited size of the actual string that is stored in the space. In the C programming language, it is the programmer's responsibility to make sure the actual string size does not exceed the size of the space allocated for it. However, programmers sometimes fail to put in the necessary checks for string size. It is possible, when programming in C, to write past the end of the current string and into the allocated space for an entirely different variable. The affected variable may or may not be another string. However, the integrity of both variables will be compromised. This paper will present the results of an experiment which shows exactly what happens when strings and other variables are compromised in this way. Writing beyond the end of a string allocation seems like a trivial problem. These faults should be easy to find and fix. However, in reality, they are nearly impossible to find in many situations. The experiment makes the problem very clear so that everyone will understand why these faults are not easy to find and fix before they cause serious problems. Since this is a C programming language problem, and both Windows and Unix operating systems are written mostly in C, many system errors may be a result of this problem. Understanding the problem can save countless hours in system debugging.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信