arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1204.4322cs.PL
收藏

保护克隆人

Secure the Clones

Thomas Jensen, Florent Kirchner, David Pichardie

摘要:

与不受信任的代码交换可变数据对象是一个微妙的问题,因为存在创建攻击者可访问的数据空间的风险。因此,Java的安全编程指南强调在接受或分发对内部可变对象的引用之前使用防御性复制的重要性。但是,复制方法(如clone())的实现完全留给程序员。它可能无法提供对象的足够深的副本,并且可能会被恶意子类重写。目前没有基于语言的机制支持安全的对象克隆。本文提出了一种基于类型的注释系统,用于为基于类的面向对象程序定义模块化复制策略。复制策略指定对象及其克隆之间允许的最大共享。我们提出了一个静态的执行机制,将保证所有类履行其复制政策,即使在存在覆盖的复制方法,并建立在Coq的整体方法的语义正确性。该机制已实现和实验评估克隆方法从几个Java库。

英文摘要:

Exchanging mutable data objects with untrusted code is a delicate matter because of the risk of creating a data space that is accessible by an attacker. Consequently, secure programming guidelines for Java stress the importance of using defensive copying before accepting or handing out references to an internal mutable object. However, implementation of a copy method (like clone()) is entirely left to the programmer. It may not provide a sufficiently deep copy of an object and is subject to overriding by a malicious sub-class. Currently no language-based mechanism supports secure object cloning. This paper proposes a type-based annotation system for defining modular copy policies for class-based object-oriented programs. A copy policy specifies the maximally allowed sharing between an object and its clone. We present a static enforcement mechanism that will guarantee that all classes fulfil their copy policy, even in the presence of overriding of copy methods, and establish the semantic correctness of the overall approach in Coq. The mechanism has been implemented and experimentally evaluated on clone methods from several Java libraries.

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

↑