Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 81577 - net-misc/bidwatcher format string security vulnerability (CAN-2005-0158)
Summary: net-misc/bidwatcher format string security vulnerability (CAN-2005-0158)
Status: RESOLVED DUPLICATE of bug 82460
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo Security
URL:
Whiteboard: B2 [upstream tomask?] koon / CLASSIFIED
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-10 21:48 UTC by Sune Kloppenborg Jeppesen (RETIRED)
Modified: 2008-06-10 18:36 UTC (History)
0 users

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


Attachments
bidwatcher.formstring.patch (bidwatcher.formstring.patch,409 bytes, patch)
2005-02-10 21:52 UTC, Sune Kloppenborg Jeppesen (RETIRED)
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2005-02-10 21:48:51 UTC
Ulf Harnhammar from the Debian Security Audit Project reports:

I have found a format string security vulnerability in bidwatcher.
It affects at least the versions 1.3.3 and 1.3.16.
 
The vulnerability occurs when printing an error message with data
sent from the eBay servers. If eBay, or someone pretending to be
eBay, sends certain data to a bidwatcher user, the format string bug
will be executed.
 
I have attached a POC written in PHP (see the comments in the
source code for installation instructions), as well as a patch.
 
I hope that we can coordinate our respective releases of bidwatcher,
so updates for this vulnerability will be published at approximately
the same time.
Comment 1 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2005-02-10 21:52:03 UTC
Created attachment 50983 [details, diff]
bidwatcher.formstring.patch

Debian patch.
Comment 2 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2005-02-10 21:52:40 UTC
Upstream answer:

I believe that particular section of the code has been removed from the
source during a conversion to libcurl.  I don't see it in my CVS tree,
so I think it's safe to say it's gone.

I do not plan to release a 1.3.16.1 bugfix for this issue because 1.3.16
is fairly broken due to some heavy eBay changes.  The CVS code is
getting near to a release, so 1.3.17 should just handle the issue.
Comment 3 Thierry Carrez (RETIRED) gentoo-dev 2005-02-11 07:56:58 UTC
Early access to release tarball may be provided... Let's wait a little :)
Comment 4 solar (RETIRED) gentoo-dev 2005-02-11 13:13:07 UTC
Please keep this bug closed forever.
My two cents. This code is pure shit.

This program does not appear as if it was coded with security in mind.

A simple 
grep intf *.cpp | grep -v \" | grep \;$
show a few things. 

bidwatcher.cpp: line 2955 
user can walk all over himself but this displays bad coding practices.
        char homePath[200];
        char lockBuffer[200];
        strcpy(homePath,getenv("HOME"));
        strcat(homePath, "/.netscape/lock");


bidwatcher.h:106:
#define MAX_STATUS_LEN 200

bidwatcher.cpp:
void showBidStatus(char *arg) {
        char msg[MAX_STATUS_LEN];
        sprintf(msg, "[%s] %s", getTimeStamp(), arg);

line 509
void auctioninfo::getkey(float bid, int quantity) {
...
..
On line 644
char lineBuff[8000];
...
..
showBidStatus(lineBuff);

This abuse of sprintf(), strcpy() list goes on and on so I would not be 
supprised in the slightest if more exploitable holes would be uncovered in this 
pkg not to far off in the near future.

Now.. This package has no metadata.xml and from reading the ChangeLog it appears that spider did the orignal commit but said he was not going to maintain it. 
-------------------------------------------------------------------------------
28 May 2002; Spider <spider@gentoo.org> ChangeLog bidwatcher-1.3.3.ebuild :
  Initial release from bugzilla bug. modified and updated version
  This ebuild is free target, Feel free to take over maintainance
-------------------------------------------------------------------------------
This type of thing needs to stop. If a dev is going to put a pkg in the tree he/she needs to maintain it. If he/she is unwilling to maintain it then it should not be going in the tree in the first place.
For the most part it looks like Martin Holzer <mholzer@gentoo.org> (Mr_Bones)
has been doing the version bumps.

My vote.. From now on any pkg which we have todo any sort of security for needs 
to have an official "active" maintainer and this needs to be listed in the 
metadata.xml. If these two conditions can not be met then I vote for masking 
then the axe.
Comment 5 Thierry Carrez (RETIRED) gentoo-dev 2005-02-15 02:28:41 UTC
1.3.17 will be released on Feb 17th, but is it worth it ?
Comment 6 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2005-02-15 02:50:15 UTC
No maintainer -> punt it.
Comment 7 Matthias Geerdsen (RETIRED) gentoo-dev 2005-02-18 07:26:31 UTC
public as of http://secunia.com/advisories/14324/ and http://sourceforge.net/project/shownotes.php?release_id=305937

public bug #82460
Comment 8 Thierry Carrez (RETIRED) gentoo-dev 2005-02-18 07:30:50 UTC

*** This bug has been marked as a duplicate of 82460 ***