Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 129375 - games-misc/bsd-games: several scanf local overflows (sail, dm) (CVE-2006-1744)
Summary: games-misc/bsd-games: several scanf local overflows (sail, dm) (CVE-2006-1744)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Games
URL: http://bugs.debian.org/cgi-bin/bugrep...
Whiteboard: B2 [ebuild] Falco
Keywords:
: 129686 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-04-09 11:52 UTC by Raphael Marichez (Falco) (RETIRED)
Modified: 2006-05-01 13:16 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch from debian for overflows in sail and dm games (bsd-games-2.17-scanf-sail-dm.patch,1.32 KB, patch)
2006-04-09 12:21 UTC, Raphael Marichez (Falco) (RETIRED)
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Raphael Marichez (Falco) (RETIRED) gentoo-dev 2006-04-09 11:52:52 UTC
Hi,

From [1] :
Multiple games in the BSD-games package are prone to locally exploitable buffer-overflow vulnerabilities. These issues are due to insufficient bounds-checking when copying user-supplied input to insufficiently sized memory buffers.

Tetris buffer overflow was corrected (see bug #122399 and [2] ). Here is the same kind of vuln with the same severity.

A buffer overflow was found is the gaim "sail" , pl_main.c :


char buf[10];
printf("\nInitial broadside %s (grape, chain, round, double): ", n ? 
"right" : "left");
fflush(stdout);
scanf("%s", buf);

You can use it to write arbitrary data in the score files.

Debian [3] has fixed (2004-04-06) several non-exploitable 'scanf' buffer overflows in the game "dm". There may be other overflows in some games.


[1] http://www.securityfocus.com/bid/17401
[2] Tetris overflow : http://www.securityfocus.com/bid/17308
[3] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=360989
(more : http://www.pulltheplug.org/fu/?q=node/56 )
Comment 1 Raphael Marichez (Falco) (RETIRED) gentoo-dev 2006-04-09 12:21:25 UTC
Created attachment 84316 [details, diff]
Patch from debian for overflows in sail and dm games
Comment 2 Jule Slootbeek 2006-04-12 06:48:17 UTC
*** Bug 129686 has been marked as a duplicate of this bug. ***
Comment 3 Jule Slootbeek 2006-04-12 06:50:59 UTC
There are also boundary errors with player names, as described here:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=360989
Comment 4 Raphael Marichez (Falco) (RETIRED) gentoo-dev 2006-04-14 06:45:42 UTC
mitre.org adds "execution of arbitrary code" in sail.

No fix available AFAIK.
Comment 5 Thierry Carrez (RETIRED) gentoo-dev 2006-04-15 05:52:19 UTC
Given our very peculiar way of handling group games, not sure the "code execution" thing affects us. Tavis ?
Comment 6 Tavis Ormandy (RETIRED) gentoo-dev 2006-04-15 07:05:36 UTC
it's a bug, but as you dont need any special permissions to alter the score file on gentoo (at the moment), it's not a security issue, all you can do is crash the game. If you could execute code via the score file, that would be a security issue.

reassigning to games team.
Comment 7 Raphael Marichez (Falco) (RETIRED) gentoo-dev 2006-04-23 00:54:24 UTC
Debian has emitted a DSA for this, and CVE-2006-1744 mentions "arbitrary code execution". I Cc: myself.
Comment 8 Mr. Bones. (RETIRED) gentoo-dev 2006-05-01 13:08:52 UTC
we're using the debian patch so I don't think we're affected.
Comment 9 Raphael Marichez (Falco) (RETIRED) gentoo-dev 2006-05-01 13:16:04 UTC
now yes. It's ok. Thanks