Bug 995854 - gnuplot: Make gnuplot's NOCWDRC (not to read the content of .gnuplot from CWD at the startup) default
Summary: gnuplot: Make gnuplot's NOCWDRC (not to read the content of .gnuplot from CWD...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: gnuplot
Version: 18
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Frantisek Kluknavsky
QA Contact: Fedora Extras Quality Assurance
URL: http://www.gnuplotting.org/configurat...
Whiteboard:
Depends On: 995851 995852
Blocks: 995855 995856
TreeView+ depends on / blocked
 
Reported: 2013-08-11 14:32 UTC by Jan Lieskovsky
Modified: 2013-08-30 13:35 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 995852
: 995855 (view as bug list)
Environment:
Last Closed: 2013-08-30 13:35:24 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jan Lieskovsky 2013-08-11 14:32:13 UTC
+++ This bug was initially created as a clone of Bug #995852 +++

+++ This bug was initially created as a clone of Bug #995851 +++

Description of problem:
As written in:
  http://www.gnuplotting.org/configuration/

or in gnuplot's startup help:

gnuplot> help startup
 When `gnuplot` is run, it looks for an initialization file to load.
 This file is called `.gnuplot` on Unix and AmigaOS systems, and
 `GNUPLOT.INI` on other systems.  If this file is not found in the
 current directory, the program will look for it in the HOME directory
 (under AmigaOS, MS-DOS, Windows and OS/2, the
 environment variable `GNUPLOT` should contain the name of this
 directory; on Windows NT, it will use `USERPROFILE` if GNUPLOT isn't
 defined).  Note: if NOCWDRC is defined during the installation,
 `gnuplot` will not read from the current directory.

 If the initialization file is found, `gnuplot` executes the commands in it.
 These may be any legal `gnuplot` commands, but typically they are limited to
 setting the terminal and defining frequently-used functions or variables.

when 'NOCWDRC' is not defined in the moment of gnuplot's startup, gnuplot tries to load content of .gnuplot file from current working directory. Since when run from untrusted directory, this might be dangerous, that feature (loading of .gnuplot content from CWD) should be disabled in the default configuration (=> 'NOCWDRC' option should be used).


Version-Release number of selected component (if applicable):
gnuplot/4.6.1/4.fc18

How reproducible:
Always

Steps to Reproduce:
1. Define some gnuplot commands (even to run some system ones) into .gnuplot file in CWD
2. Run gnuplot


Actual results:
Commands from .gnuplot in CWD are executed by gnuplot startup.

Expected results:
Commands aren't executed.

Additional info:
This is not a security flaw, since above behaviour is documented in gnuplot startup help and/or in upstream documentation.

Anyway, the more secure (not to load .gnuplot from CWD at startup) behaviour should be used.

Comment 1 Frantisek Kluknavsky 2013-08-30 13:35:24 UTC
It does not seem to affect recent Fedoras, closing as WORKSFORME.


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