Bug 1120093 (CVE-2014-4978) - CVE-2014-4978 rawstudio: Insecure use of temporary file
Summary: CVE-2014-4978 rawstudio: Insecure use of temporary file
Alias: CVE-2014-4978
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
Depends On: 1120094
TreeView+ depends on / blocked
Reported: 2014-07-16 09:24 UTC by Vasyl Kaigorodov
Modified: 2019-09-29 13:19 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-07-18 05:26:11 UTC

Attachments (Terms of Use)

Description Vasyl Kaigorodov 2014-07-16 09:24:05 UTC
The following was reported:
The function "rs_filter_graph" located in file ./librawstudio/rs-filter.c contains the following code:

        g_string_append_printf(str, "}\n");
        g_file_set_contents("/tmp/rs-filter-graph", str->str, str->len, NULL);

        ignore = system("dot -Tpng >/tmp/rs-filter-graph.png </tmp/rs-filter-graph");
        ignore = system("gnome-open /tmp/rs-filter-graph.png");

This code makes insecure use of two temporary files:


This allows the truncation of arbitrary files which are owned by the user running
rawstudio - for example:

	ln -s ~/.important /tmp/rs-filter-graph
	ln -s /etc/shadow /tmp/rs-filter-graph.png

Comment 1 Vasyl Kaigorodov 2014-07-16 09:24:19 UTC
Created rawstudio tracking bugs for this issue:

Affects: fedora-all [bug 1120094]

Comment 2 Vasyl Kaigorodov 2014-07-16 09:34:22 UTC
CVE request: http://seclists.org/oss-sec/2014/q3/160

Comment 3 Murray McAllister 2014-07-17 04:54:20 UTC
(In reply to Vasyl Kaigorodov from comment #2)
> CVE request: http://seclists.org/oss-sec/2014/q3/160

MITRE assigned CVE-2014-4978 to this issue.

Comment 4 Gianluca Sforna 2014-10-03 06:56:36 UTC
Upstream seems dead, last commit is on February, maybe it's time to retire the package.

Comment 5 Anders Brander 2014-12-03 07:07:26 UTC
This is upstream - not dead :)

Please note that this function can not be called by end users without modifying Rawstudio source. We disabled it in march 2011.

Fix is here for future references:

- but IMO the fix is not very important. End users cannot call this without adding a "FilterGraph" menuitem to ui.xml.

Comment 6 Fedora Update System 2015-07-18 02:03:11 UTC
rawstudio-2.1-0.1.20150511git983bda1.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Sergio Basto 2015-07-18 05:26:11 UTC

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