硅微电子学
CPU 微结构中侦测和防止缓冲区溢出的实现Ξ
陈志强 严晓浪
(浙江大学VLSI 设计研究所, 杭州, 310027)
2004209210 收稿, 2004211201 收改稿
摘要: 提出了一种设计在 CPU 里的侦测和防止缓冲区溢出的硬件方法。在微结构中增加一个秘钥寄生器, 用
这个秘钥来加密子程序的返回地址。在子程序调用时, 加密的返回地址被插入到堆栈帧之间, 而明文的返回地址仍
然按原操作压入堆栈。这样, 返回地址在堆栈中就有了两个拷贝。在子程序返回时, 加密明文返回地址并与密文返
回地址相比较。如果比较结果不一致, 就能确定发生缓冲区溢出, C PU 立即触发缓冲区溢出中断来防止攻击。所有
与存取加密返回地址相关的堆栈操作、加解密操作和比较操作等都通过在微结构中增加一执行单元来实现。这些
操作和硬件改变对软件都是透明的。与一些软件方法相比, 提出的方法充分利用执行单元的并行性, 从而极大地减
少了对性能的影响。
关键词: 缓冲区溢出; 中央处理器; 微体系结构; 集成电路
中图分类号: TN 47 文献标识码:A 文章编号: 100023819 (2006) 022214206
Hardware Solution for Detection and Prevention
of Buffer Overflow Attacks in CPU M icro-architecture
CHEN Zhiqiang YAN Xiaolang
(VL S I D esign Institute of Zhejiang U niversity , H angzhou, 310027, CH N )
Abstract: A new hardware solution for detection and prevention of stack2sm ashing attacks is
proposed. A number is kept as key in CPU to encrypt return address. The cipher return address
is inserted between stack frames, and the plain return address ispushed to stack as conventional.
If the two return addresses loaded back mismatch when subroutine returns, buffer overflow is
下一页