Linux critical vulnerability
9 отговора
525 прегледа
Linux critical vulnerability
открита е нова дупка в 2.2, 2.4 и 2.6 ядрата с изключение на 2.4.24
Synopsis: Linux kernel do_mremap local privilege escalation vulnerability
Product: Linux kernel
Version: 2.2, 2.4 and 2.6 series
Vendor: [линк]
URL: [линк]
CVE: [линк]
Author: Paul Starzetz <[email protected]>,
Wojciech Purczynski <[email protected]>
Date: January 5, 2004
Issue:
======
A critical security vulnerability has been found in the Linux kernel
memory management code in mremap(2) system call due to incorrect bound
checks.
Details:
========
The mremap system call provides functionality of resizing (shrinking or
growing) as well as moving across process's addressable space of existing
virtual memory areas (VMAs) or any of its parts.
A typical VMA covers at least one memory page (which is exactly 4kB on
the i386 architecture). An incorrect bound check discovered inside the
do_mremap() kernel code performing remapping of a virtual memory area
may lead to creation of a virtual memory area of 0 bytes length.
The problem bases on the general mremap flaw that remapping of 2 pages
from inside a VMA creates a memory hole of only one page in length but
an additional VMA of two pages. In the case of a zero sized remapping
request no VMA hole is created but an additional VMA descriptor of 0
bytes in length is created.
Such a malicious virtual memory area may disrupt the operation of other
parts of the kernel memory management subroutines finally leading to
unexpected behavior.
A typical process's memory layout showing invalid VMA created with
mremap system call:
08048000-0804c000 r-xp 00000000 03:05 959142 /tmp/test
0804c000-0804d000 rw-p 00003000 03:05 959142 /tmp/test
0804d000-0804e000 rwxp 00000000 00:00 0
40000000-40014000 r-xp 00000000 03:05 1544523 /lib/ld-2.3.2.so
40014000-40015000 rw-p 00013000 03:05 1544523 /lib/ld-2.3.2.so
40015000-40016000 rw-p 00000000 00:00 0
4002c000-40158000 r-xp 00000000 03:05 1544529 /lib/libc.so.6
40158000-4015d000 rw-p 0012b000 03:05 1544529 /lib/libc.so.6
4015d000-4015f000 rw-p 00000000 00:00 0
[*] 60000000-60000000 rwxp 00000000 00:00 0
bfffe000-c0000000 rwxp fffff000 00:00 0
The broken VMA in the above example has been marked with a [*].
Impact:
=======
Since no special privileges are required to use the mremap(2) system
call any process may misuse its unexpected behavior to disrupt the kernel
memory management subsystem. Proper exploitation of this vulnerability may
lead to local privilege escalation including execution of arbitrary code
with kernel level access. Proof-of-concept exploit code has been created
and successfully tested giving UID 0 shell on vulnerable systems.
The exploitability of the discovered vulnerability is possible, although
not a trivial one. We have identified at least two different attack
vectors for the 2.4 kernel series. All users are encouraged to patch all
vulnerable systems as soon as appropriate vendor patches are released.
Credits:
========
Paul Starzetz <[email protected]> has identified the vulnerability and
performed further research.
Disclaimer:
===========
This document and all the information it contains are provided "as is",
for educational purposes only, without warranty of any kind, whether
express or implied.
The authors reserve the right not to be responsible for the topicality,
correctness, completeness or quality of the information provided in
this document. Liability claims regarding damage caused by the use of
any information provided, including any kind of information which is
incomplete or incorrect, will therefore be rejected.
~~~~~~~ Surfing on sine waves ~~~~~~~
Synopsis: Linux kernel do_mremap local privilege escalation vulnerability
Product: Linux kernel
Version: 2.2, 2.4 and 2.6 series
Vendor: [линк]
URL: [линк]
CVE: [линк]
Author: Paul Starzetz <[email protected]>,
Wojciech Purczynski <[email protected]>
Date: January 5, 2004
Issue:
======
A critical security vulnerability has been found in the Linux kernel
memory management code in mremap(2) system call due to incorrect bound
checks.
Details:
========
The mremap system call provides functionality of resizing (shrinking or
growing) as well as moving across process's addressable space of existing
virtual memory areas (VMAs) or any of its parts.
A typical VMA covers at least one memory page (which is exactly 4kB on
the i386 architecture). An incorrect bound check discovered inside the
do_mremap() kernel code performing remapping of a virtual memory area
may lead to creation of a virtual memory area of 0 bytes length.
The problem bases on the general mremap flaw that remapping of 2 pages
from inside a VMA creates a memory hole of only one page in length but
an additional VMA of two pages. In the case of a zero sized remapping
request no VMA hole is created but an additional VMA descriptor of 0
bytes in length is created.
Such a malicious virtual memory area may disrupt the operation of other
parts of the kernel memory management subroutines finally leading to
unexpected behavior.
A typical process's memory layout showing invalid VMA created with
mremap system call:
08048000-0804c000 r-xp 00000000 03:05 959142 /tmp/test
0804c000-0804d000 rw-p 00003000 03:05 959142 /tmp/test
0804d000-0804e000 rwxp 00000000 00:00 0
40000000-40014000 r-xp 00000000 03:05 1544523 /lib/ld-2.3.2.so
40014000-40015000 rw-p 00013000 03:05 1544523 /lib/ld-2.3.2.so
40015000-40016000 rw-p 00000000 00:00 0
4002c000-40158000 r-xp 00000000 03:05 1544529 /lib/libc.so.6
40158000-4015d000 rw-p 0012b000 03:05 1544529 /lib/libc.so.6
4015d000-4015f000 rw-p 00000000 00:00 0
[*] 60000000-60000000 rwxp 00000000 00:00 0
bfffe000-c0000000 rwxp fffff000 00:00 0
The broken VMA in the above example has been marked with a [*].
Impact:
=======
Since no special privileges are required to use the mremap(2) system
call any process may misuse its unexpected behavior to disrupt the kernel
memory management subsystem. Proper exploitation of this vulnerability may
lead to local privilege escalation including execution of arbitrary code
with kernel level access. Proof-of-concept exploit code has been created
and successfully tested giving UID 0 shell on vulnerable systems.
The exploitability of the discovered vulnerability is possible, although
not a trivial one. We have identified at least two different attack
vectors for the 2.4 kernel series. All users are encouraged to patch all
vulnerable systems as soon as appropriate vendor patches are released.
Credits:
========
Paul Starzetz <[email protected]> has identified the vulnerability and
performed further research.
Disclaimer:
===========
This document and all the information it contains are provided "as is",
for educational purposes only, without warranty of any kind, whether
express or implied.
The authors reserve the right not to be responsible for the topicality,
correctness, completeness or quality of the information provided in
this document. Liability claims regarding damage caused by the use of
any information provided, including any kind of information which is
incomplete or incorrect, will therefore be rejected.
~~~~~~~ Surfing on sine waves ~~~~~~~
Редактирано от refract на
Re: Linux critical vulnerability
ето и фикс от Wojtek Kaniewski за <=2.4.23 ядрата
# wget [линк]
# gcc -Wall -O3 -fomit-frame-pointer -I/usr/src/linux/include -c -o
mremap.o mremap.c
# insmod mremap.o
~~~~~~~ Surfing on sine waves ~~~~~~~
# wget [линк]
# gcc -Wall -O3 -fomit-frame-pointer -I/usr/src/linux/include -c -o
mremap.o mremap.c
# insmod mremap.o
~~~~~~~ Surfing on sine waves ~~~~~~~
Re: Weche ima i rabotesht exploit w mrezhata
Izlezli sa i dosta pachove za 2.6.0, eto edin ot kernel.org:
[линк]
Best Regards,,,,
[линк]
Best Regards,,,,
Re: Weche ima i rabotesht exploit w mrezhata
А някой били казал какво представлява този exploid
Re: Weche ima i rabotesht exploit w mrezhata
remote or local exploit? neshto me marzi da prekompiliram kernel dnes ...
Re: Weche ima i rabotesht exploit w mrezhata
Ami to po princip e exploit
i si raboti, pri men pone si dejstwa, no sa izlezli patchowe i za 2.6 i za 2.4.24
i si raboti, pri men pone si dejstwa, no sa izlezli patchowe i za 2.6 i za 2.4.24
Re: Weche ima i rabotesht exploit w mrezhata
Разбирам че е експлойт. Питам дали изисква логин достъп до машината или може да се екплоатира демон слушащ на някой порт.
Днес наистина нямам време да патчвам и да прекомпилирам ...
Днес наистина нямам време да патчвам и да прекомпилирам ...
Съдейки по описанието на проблема
трябва ти локален достъп. Не че пречи да има демон, който да го прецакаш така, че да се стигне до този проблем, ама все пак това си е вече проблем на този демон, отделен от самия пропуск в ядрото.
Ops sorry :)
Malko se zaplesnah, dokato postwahj minalija pyt :)))
local root expoloit e :)
local root expoloit e :)