Bug 1194209 - CVE-2015-1877 xdg-utils: command injection vulnerability due to local variables collision in xdg-open [fedora-all]
Summary: CVE-2015-1877 xdg-utils: command injection vulnerability due to local variabl...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: xdg-utils
Version: 21
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Rex Dieter
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: CVE-2015-1877
TreeView+ depends on / blocked
 
Reported: 2015-02-19 10:47 UTC by Vasyl Kaigorodov
Modified: 2015-02-25 10:14 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Release Note
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-20 17:04:58 UTC
Type: ---


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
FreeDesktop.org 89129 0 None None None Never

Description Vasyl Kaigorodov 2015-02-19 10:47:20 UTC
This is an automatically created tracking bug!  It was created to ensure
that one or more security vulnerabilities are fixed in affected versions
of Fedora.

For comments that are specific to the vulnerability please use bugs filed
against the "Security Response" product referenced in the "Blocks" field.

For more information see:
http://fedoraproject.org/wiki/Security/TrackingBugs

When submitting as an update, use the fedpkg template provided in the next
comment(s).  This will include the bug IDs of this tracking bug as well as
the relevant top-level CVE bugs.

Please also mention the CVE IDs being fixed in the RPM changelog and the
fedpkg commit message.

NOTE: this issue affects multiple supported versions of Fedora. While only
one tracking bug has been filed, please correct all affected versions at
the same time.  If you need to fix the versions independent of each other,
you may clone this bug as appropriate.

[bug automatically created by: add-tracking-bugs]

Comment 1 Vasyl Kaigorodov 2015-02-19 10:47:25 UTC
Use the following template to for the 'fedpkg update' request to submit an
update for this issue as it contains the top-level parent bug(s) as well as
this tracking bug.  This will ensure that all associated bugs get updated
when new packages are pushed to stable.

=====

# bugfix, security, enhancement, newpackage (required)
type=security

# testing, stable
request=testing

# Bug numbers: 1234,9876
bugs=1194205,1194209

# Description of your update
notes=Security fix for CVE-2015-1877

# Enable request automation based on the stable/unstable karma thresholds
autokarma=True
stable_karma=3
unstable_karma=-3

# Automatically close bugs when this marked as stable
close_bugs=True

# Suggest that users restart after update
suggest_reboot=False

======

Additionally, you may opt to use the bodhi update submission link instead:

https://admin.fedoraproject.org/updates/new/?type_=security&bugs=1194205,1194209

Comment 2 Rex Dieter 2015-02-20 17:04:58 UTC
I think I would dispute that fedora is affected by this, referencing my comment in the upstream bug,
https://bugs.freedesktop.org/show_bug.cgi?id=89129

-----------------------------
The code has diverged a bit in git so the proposed debian patch no longer applies.  

But good news:  the current code should be safe(r), since all uses of 
local $var
are initialized to avoid the problem, in particular, the code closest to what this patch touches now contains:


search_desktop_file()
{
    local default="$1"
    local dir="$2"
    local arg="$3"

    local file=""
    # look for both vendor-app.desktop, vendor/app.desktop
...


Lastly, with test case given in debian report, I cannot reproduce, at least not with the versions of bash and dash shipped with fedora 20:

$ cat testme
testme() {
   x=backfromthedead
   local x
   echo $x
}

$ bash testme

$ dash testme

$ rpm -q bash dash
bash-4.2.53-2.fc20.i686
dash-0.5.8-1.fc20.i686

Comment 3 Ján Rusnačko 2015-02-25 10:14:29 UTC
Apologies, this bug was filed prior to the proper analysis. Fedora is not affected by this flaw.

Thanks for looking into this!


Note You need to log in before you can comment on or make changes to this bug.