Bug 868682 (CVE-2014-2527) - VUL-0: CVE-2014-2527 CVE-2014-2528: kdirstat: command injection in kcleanup
Summary: VUL-0: CVE-2014-2527 CVE-2014-2528: kdirstat: command injection in kcleanup
Status: RESOLVED FIXED
Alias: CVE-2014-2527
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Deadline: 2014-07-14
Assignee: E-mail List
QA Contact: Security Team bot
URL: https://smash.suse.de/issue/97075/
Whiteboard: maint:released:sle11-sp1:58181 maint:...
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-17 13:04 UTC by Marcus Meissner
Modified: 2019-07-22 14:36 UTC (History)
6 users (show)

See Also:
Found By: Security Response Team
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcus Meissner 2014-03-17 13:04:42 UTC
OSS:12368

From: Murray McAllister <mmcallis@redhat.com>

Good morning,

Adrian Panasiuk discovered that the KDirStat (KDE Directory Statistics) 
tool did not correctly escape quotes when deleting a directory 
permanently. Attempting to use KDirStat to permanently delete a 
directory that has a malicious name could result in arbitrary command 
execution.

Original report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=741659

The Debian report is about single quotes. On Fedora 
(https://bugzilla.redhat.com/show_bug.cgi?id=1077059) double quotes were 
needed.

Can a CVE please be assigned if one has not been already? (And maybe it 
should be escaping ';' too if not already?)

Thanks,



References:
http://comments.gmane.org/gmane.comp.security.oss.general/12368
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=741659
https://bugzilla.redhat.com/show_bug.cgi?id=1077059
Comment 1 Marcus Meissner 2014-03-17 13:08:04 UTC
the command start logic in kcleanup really needs polish.

could use the generic KDE versions (there must be some).
Comment 2 Swamp Workflow Management 2014-03-17 23:00:45 UTC
bugbot adjusting priority
Comment 3 Marcus Meissner 2014-03-18 15:27:32 UTC
from mitre

> The Debian report is about single quotes. On Fedora
> (https://bugzilla.redhat.com/show_bug.cgi?id=1077059) double quotes were
> needed.

The recent upstream patch:

  https://bitbucket.org/jeromerobert/k4dirstat/commits/1ad2e96d73fa06cd9be0f3749b337c03575016aa#chg-src/kcleanup.cpp

addressed the ' issue using the '\\'' approach.

http://dl.fedoraproject.org/pub/fedora/linux/releases/19/Everything/source/SRPMS/k/k4dirstat-2.7.0-0.9.20101010git6c0a9e6.fc19.src.rpm
has:

    expanded.replace( QRegExp( "%p" ),
                      "\"" + QString::fromLocal8Bit( item->url() )  + "\"" );
    expanded.replace( QRegExp( "%n" ),
                      "\"" + QString::fromLocal8Bit( item->name() ) + "\"" );

As mentioned in the
http://openwall.com/lists/oss-security/2014/02/09/1 post, attempted
use of " for this type of quoting is a conceptually different problem
than attempted use of ' for this type of quoting, even if both
attempts are ultimately incorrect.

(We did not try to check whether the upstream version made a change
from incorrect use of " to incorrect use of ' at some point. This
could be considered an incomplete fix.)

Use CVE-2014-2527 for the vulnerability involving use of " (as shown
in the above calls to expanded.replace). This CVE assignment applies
to any upstream code or any Fedora-specific code that has this
specific issue.

Use CVE-2014-2528 for the vulnerability involving use of ' (as shown
in the above https://bitbucket.org commit).
If anyone happens to identify a version of the code that does not
attempt any type of quoting, a third CVE assignment may be possible.

> (And maybe it should be escaping ';' too if not already?)

This would typically not be addressed as a separate fix.
Comment 4 Marcus Meissner 2014-06-30 14:31:21 UTC
lets do an update for SLE too, if affected.
Comment 5 Swamp Workflow Management 2014-06-30 14:32:16 UTC
An update workflow for this issue was started.
This issue was rated as moderate.
Please submit fixed packages until 2014-07-14.
When done, reassign the bug to security-team@suse.de.
https://swamp.suse.de/webswamp/wf/58119
Comment 6 SMASH SMASH 2014-06-30 14:35:16 UTC
Affected packages:

SLE-10-SP3-TERADATA: kdirstat
SLE-11-SP3: kdirstat
Comment 8 Ruediger Oertel 2014-07-08 12:16:32 UTC
I have patchinfos for sle9-sp3-tera and sle10-sp3 ... anything coming up for these ?
Comment 9 Swamp Workflow Management 2014-07-24 01:05:04 UTC
SUSE-SU-2014:0930-1: An update that fixes two vulnerabilities is now available.

Category: security (moderate)
Bug References: 868682
CVE References: CVE-2014-2527,CVE-2014-2528
Sources used:
SUSE Linux Enterprise Server 11 SP3 for VMware (src):    kdirstat-2.4.4-255.28.1
SUSE Linux Enterprise Server 11 SP3 (src):    kdirstat-2.4.4-255.28.1
SUSE Linux Enterprise Desktop 11 SP3 (src):    kdirstat-2.4.4-255.28.1
Comment 10 Marcus Meissner 2014-07-28 08:33:45 UTC
openSUSE updates are still missing..

KDE Maintainers?
Comment 11 Bernhard Wiedemann 2014-07-29 11:00:15 UTC
This is an autogenerated message for OBS integration:
This bug (868682) was mentioned in
https://build.opensuse.org/request/show/242828 13.1 / kdirstat
Comment 12 Swamp Workflow Management 2014-08-11 08:12:17 UTC
openSUSE-SU-2014:0984-1: An update that fixes one vulnerability is now available.

Category: security (moderate)
Bug References: 868682
CVE References: CVE-2014-2528
Sources used:
openSUSE 13.1 (src):    kdirstat-2.4.4-273.4.1
Comment 13 Marcus Meissner 2014-09-01 13:54:44 UTC
thanks!