Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 502536 (CVE-2014-2093) - <dev-util/catfish-1.0.2: insecure loading of python script (CVE-2014-{2093,2094,2095,2096})
Summary: <dev-util/catfish-1.0.2: insecure loading of python script (CVE-2014-{2093,20...
Status: RESOLVED FIXED
Alias: CVE-2014-2093
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Gentoo Security
URL: https://bugzilla.redhat.com/show_bug....
Whiteboard: B4 [glsa]
Keywords:
: 518298 (view as bug list)
Depends on: 506042
Blocks: 495156 518294
  Show dependency tree
 
Reported: 2014-02-26 13:43 UTC by Agostino Sarubbo
Modified: 2014-08-13 19:19 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2014-02-26 13:43:20 UTC
From ${URL} :

A Debian bug report [1] indicated that catfish suffers from some bad logic when loading the catfish.py 
script from the /usr/bin/catfish script.  This script intentionally looks to load catfish.py in the 
current working directory.  If a user were to run catfish in an untrusted directory that contained a 
malicious catfish.py, that script would be executed with the privileges of the user running catfish.

This script:

#!/usr/bin/env bash

APPNAME=catfish

if [ -e $APPNAME.py ]
    then python $APPNAME.py "$@"
    else
        if [ -e $APPNAME.py ]
            then python $APPNAME.py "$@"
            else
                cd /usr/share/$APPNAME
                if [ -e $APPNAME.py ]
                    then python $APPNAME.py "$@"
                    else
                        python $APPNAME.py "$@"
                fi
        fi
    fi

should probably be:

#!/bin/sh
python /usr/share/catfish.py "$@"

The rest is just development fluff and very poorly written.


[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=739958


@maintainer(s): after the bump, in case we need to stabilize the package, please let us know if it is ready for the stabilization or not.
Comment 1 GLSAMaker/CVETool Bot gentoo-dev 2014-04-10 21:18:42 UTC
CVE-2014-2096 (http://nvd.nist.gov/nvd.cfm?cvename=CVE-2014-2096):
  Untrusted search path vulnerability in Catfish 0.6.0 through 1.0.0 allows
  local users to gain privileges via a Trojan horse bin/catfish.py under the
  current working directory.

CVE-2014-2095 (http://nvd.nist.gov/nvd.cfm?cvename=CVE-2014-2095):
  Untrusted search path vulnerability in Catfish 0.6.0 through 1.0.0, when a
  Fedora package such as 0.8.2-1 is not used, allows local users to gain
  privileges via a Trojan horse bin/catfish.pyc under the current working
  directory.

CVE-2014-2094 (http://nvd.nist.gov/nvd.cfm?cvename=CVE-2014-2094):
  Untrusted search path vulnerability in Catfish through 0.4.0.3, when a
  Fedora package such as 0.4.0.2-2 is not used, allows local users to gain
  privileges via a Trojan horse catfish.pyc in the current working directory.

CVE-2014-2093 (http://nvd.nist.gov/nvd.cfm?cvename=CVE-2014-2093):
  Untrusted search path vulnerability in Catfish through 0.4.0.3 allows local
  users to gain privileges via a Trojan horse catfish.py in the current
  working directory.
Comment 2 Christian Tietz 2014-04-11 20:41:21 UTC
ping

In the meantime, =dev-util/catfish-1.0.2 has been released. Please update.

https://launchpad.net/catfish-search
Comment 3 Samuli Suominen gentoo-dev 2014-07-28 11:32:47 UTC
*** Bug 518298 has been marked as a duplicate of this bug. ***
Comment 4 Samuli Suominen gentoo-dev 2014-07-28 11:47:10 UTC
From ChangeLog file of catfish-1.0.2 tarball:

v1.0.1:
 + Fix CVE-2014-2093 CVE-2014-2094 CVE-2014-2095 CVE-2014-2096
   - Debian #739958
   - Fedora #1069396
 + Fix multiple-selection regression (lp: #1283726)
Comment 5 Samuli Suominen gentoo-dev 2014-07-28 11:47:39 UTC
Please test and stabilize:

=dev-util/catfish-1.0.2
Comment 6 Paweł Stankowski 2014-07-28 21:19:38 UTC
(In reply to Samuli Suominen from comment #5)
> Please test and stabilize:
> 
> =dev-util/catfish-1.0.2

I'm gentoo newbie, so excuse me if following question is not relevant.

To resolve dependency on pexpect for python 3.3 I had to use unstable pexpect (~amd64). So shouldn't this bug depend on Bug 506042 which is stabilization request for pexpect 3.0 compatible with python 3.3?
Comment 7 Samuli Suominen gentoo-dev 2014-07-29 08:15:21 UTC
(In reply to Paweł Stankowski from comment #6)
> So shouldn't this bug depend on Bug 506042 which is stabilization request
> for pexpect 3.0 compatible with python 3.3?

sure, you are right
Comment 8 Agostino Sarubbo gentoo-dev 2014-08-02 13:44:25 UTC
amd64 stable
Comment 9 Agostino Sarubbo gentoo-dev 2014-08-02 13:48:02 UTC
x86 stable.

Maintainer(s), please cleanup.
Security, please vote.
Comment 10 Mikle Kolyada archtester Gentoo Infrastructure gentoo-dev Security 2014-08-02 14:57:17 UTC
GLSA vote: yes
Comment 11 Yury German Gentoo Infrastructure gentoo-dev Security 2014-08-02 18:47:02 UTC
Maintainer(s), please drop the vulnerable version.

GLSA Vote: Yes
Created a New GLSA request.
Comment 12 Samuli Suominen gentoo-dev 2014-08-03 04:22:30 UTC
cleanup done, unCCing desktop-misc@, nothing left for us here
Comment 13 GLSAMaker/CVETool Bot gentoo-dev 2014-08-13 19:19:00 UTC
This issue was resolved and addressed in
 GLSA 201408-04 at http://security.gentoo.org/glsa/glsa-201408-04.xml
by GLSA coordinator Mikle Kolyada (Zlogene).