arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 0906.2512cs.SEcs.CR
收藏

一个更安全的C语言库ISO/IEC TR 24731的实现

On Implementation of a Safer C Library, ISO/IEC TR 24731

Marc-André Laverdière, Serguei A. Mokhov, Djamel Benredjem

摘要:

作为ISO C 1999的一部分标准化的函数及其附录对以前可用的库的安全选项的改进非常小。最大的缺陷仍然是,没有函数要求任何函数复制数据到用户提供的缓冲区的目的地缓冲区的缓冲区大小。根据我们之前的研究,我们知道错误条件处理是安全漏洞的第一个解决方案,其次是前提条件验证。标准C函数通常执行很少的前提条件验证和错误处理,允许在使用中引入广泛的安全问题。ISO/IEC TR 24731,标题为“TR 24731:更安全的C库函数”,定义了41个新的库函数,用于内存复制,字符串处理(包括正常和宽字符串),时间打印,排序,搜索等。它还指定了通过其函数操作的所有字符串的空终止,并引入了一个新的无符号整型类型,有助于防止整数溢出和下溢。它目前由Microsoft作为其Visual Studio 2005及更高版本的一部分实现。我们研究我们的ISO/IEC TR 24731的实施架构。在介绍西门子四视图模型之前,我们首先介绍我们的架构哲学,这是一种用于大型软件系统概念的架构方法。然后,我们检查为我们的库构建的每个视图。最后,我们总结了其他软件工程问题,这些问题在我们的实现开发中非常重要。

英文摘要:

The functions standardized as part of ISO C 1999 and their addendums improved very little the security options from the previously available library. The largest flaw remained that no function asked for the buffer size of destination buffers for any function copying data into a user-supplied buffer. According to earlier research we performed, we know that error condition handling was the first solution to security vulnerabilities, followed by precondition validation. The standard C functions typically perform little precondition validation and error handling, allowing for a wide range of security issues to be introduced in their use. ISO/IEC TR 24731, titled as "TR 24731: Safer C library functions", defines 41 new library functions for memory copying, string handling (both for normal and wide character strings), time printing, sorting, searching etc. Another innovation it brings is a constraint handling architecture, forcing error handling when certain security-related preconditions are violated when the functions are called. It also specifies the null-termination of all strings manipulated through its function and introduces a new unsigned integer type that helps preventing integer overflows and underflows. It is currently implemented by Microsoft as part of their Visual Studio 2005 and above. We examine the architecture of our implementation of ISO/IEC TR 24731. We first introduce our architectural philosophy before informing the reader about the Siemens Four View Model, an architectural methodology for the conception of large-scale software systems. Afterwards, we examine each of the view, as architected for our library. Finally, we conclude with other software engineering matters that were of high importance in the development of our implementation.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑