Richard Gooch SimpleInit 开放文件描述符漏洞

漏洞信息详情

Richard Gooch SimpleInit 开放文件描述符漏洞

漏洞简介

Linux系统的simpleinit在创建子进程时不能关闭读/写FIFO文件描述符。子进程可以利用该漏洞导致simpleinit执行拥有根目录特权的任意程序。

漏洞公告

An unofficial patch has been provided by Patrick Smith :
— login-utils/simpleinit.c.orig 2001-09-29 11:09:10.000000000 -0400
+++ login-utils/simpleinit.c 2002-05-23 22:16:07.000000000 -0400
@@ -203,6 +203,18 @@
if ( ( initctl_fd = open (initctl_name, O_RDWR, 0) ) < 0 )
err ( _(“error opening fifo\n”) );
}
+ if ( initctl_fd >= 0 )
+ if ( fcntl (initctl_fd, F_SETFD, FD_CLOEXEC) != 0 ) {
+ err ( _(“error setting close-on-exec on /dev/initctl”) );
+ /* Can the fcntl ever fail? If it does, and we leave
+ the descriptor open in child processes, then any
+ process on the system will be able to write to
+ /dev/initctl and have us execute arbitrary commands
+ as root. So let’s refuse to use the fifo in this
+ case. */
+ close(initctl_fd);
+ initctl_fd = -1;
+ }
if ( want_single || (access (_PATH_SINGLE, R_OK) == 0) ) do_single ();
Currently we are not aware of any vendor-supplied patches for this issue. If you feel we are in error or are aware of more recent information, please mail us at: vuldb@securityfocus.com .
@securityfocus.com>
@pobox.com>

参考网址

来源: BID
名称: 5001
链接:http://www.securityfocus.com/bid/5001

来源: XF
名称: simpleinit-file-descriptor-open(9357)
链接:http://www.iss.net/security_center/static/9357.php

来源: BUGTRAQ
名称: 20020613 simpleinit root exploit – file descriptor left open
链接:http://online.securityfocus.com/archive/1/276739

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享