[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: gEDA-bug: [Bug 700194] gsch2pcb `gnetlist-arg' in project file can lead to arbitrary code execution.
The `--gnetlist-arg' parameter was introduced in:
http://git.gpleda.org/?p=gaf.git;h=f1104b263b21
This bug affects the following gEDA releases:
1.5.1-20081221
1.5.2-20090328
1.5.3-20090829
1.5.4-20090830
1.6.0-20091004
1.6.1-20100214
Proposed patch for gEDA/gaf 1.6.x attached.
affects ubuntu/geda-gaf
assigned peter-b
status inprogress
importance high
** Patch added: "0001-gsch2pcb-Don-t-allow-gnetlist-arg-in-project-file.patch"
https://bugs.launchpad.net/bugs/700194/+attachment/1787820/+files/0001-gsch2pcb-Don-t-allow-gnetlist-arg-in-project-file.patch
** Also affects: geda-gaf (Ubuntu)
Importance: High
Status: In Progress
** Changed in: geda-gaf (Ubuntu)
Status: In Progress => New
** Changed in: geda
Assignee: (unassigned) => Peter TB Brett (peter-b)
** Changed in: geda
Importance: Undecided => High
** Changed in: geda
Status: New => In Progress
--
You received this bug notification because you are a member of gEDA Bug
Team, which is a direct subscriber.
https://bugs.launchpad.net/bugs/700194
Title:
gsch2pcb `gnetlist-arg' in project file can lead to arbitrary code execution.
Status in GPL Electronic Design Automation tools:
In Progress
Status in âgeda-gafâ package in Ubuntu:
New
Bug description:
affects geda
tag gsch2pcb
security yes
done
The `--gnetlist-arg' option to gsch2pcb is used to pass arbitrary
arguments to gnetlist. This option can also be provided in a project
file.
This option can allow arbitrary code execution via a maliciously crafted
project file and/or schematics, by several possible vectors.
The most blatant is direct Scheme code execution:
gnetlist-arg "-c (display 'EVIL) (newline)"
Of middling deviousness is execution of Scheme programs disguised as
schematics:
gnetlist-arg -minnocuous.sch
gnetlist-arg -lharmless.sch
Most subtle is manipulation of the Scheme load path via the -L option:
gnetlist-arg -L.
If a file called `gnetlist' is placed in the same directory as
`evil.project' (easily confused with `gnetlistrc' by the hapless user),
it will be loaded in preference to `gnetlist.scm' installed with gEDA
and always loaded during gnetlist initialisation.
These attacks can all be easily reproduced.
Because gsch2pcb project files are usually considered in the minds of
users to be datafiles, this option (which would be fine if present in a
Makefile or some other file normally considered as an executed file) is
a security risk.
Recommended fix: `--gnetlist-arg' option should be disallowed in
gsch2pcb project files. The only "legitimate" gnetlist command-line
option it enables is `-O' (for passing backend options), and none of the
backends used by gsch2pcb currently take any options.
_______________________________________________
geda-bug mailing list
geda-bug@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-bug