<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: What does \write18 mean?</title>
	<atom:link href="http://www.texdev.net/2009/10/06/what-does-write18-mean/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.texdev.net/2009/10/06/what-does-write18-mean/</link>
	<description>Coding in the TeX world</description>
	<lastBuildDate>Mon, 08 Mar 2010 14:08:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: No restricted write18 just yet! at Some TeX Developments</title>
		<link>http://www.texdev.net/2009/10/06/what-does-write18-mean/comment-page-1/#comment-1391</link>
		<dc:creator>No restricted write18 just yet! at Some TeX Developments</dc:creator>
		<pubDate>Wed, 14 Oct 2009 16:05:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.texdev.net/?p=476#comment-1391</guid>
		<description>[...] posted about restricted write18 support in TeX Live 2009 (and MiKTeX 2.8), a message to the TeX Live [...]</description>
		<content:encoded><![CDATA[<p>[...] posted about restricted write18 support in TeX Live 2009 (and MiKTeX 2.8), a message to the TeX Live [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joseph Wright</title>
		<link>http://www.texdev.net/2009/10/06/what-does-write18-mean/comment-page-1/#comment-1390</link>
		<dc:creator>Joseph Wright</dc:creator>
		<pubDate>Wed, 14 Oct 2009 15:50:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.texdev.net/?p=476#comment-1390</guid>
		<description>user,

A message to the TeX Live list today states that the feature has been disabled (at least for the moment) for the reason you outline (bypassing openout_any-restrictions). So the it looks to me like the TeX Live team do take this kind of concern seriously.

Joseph</description>
		<content:encoded><![CDATA[<p>user,</p>
<p>A message to the TeX Live list today states that the feature has been disabled (at least for the moment) for the reason you outline (bypassing openout_any-restrictions). So the it looks to me like the TeX Live team do take this kind of concern seriously.</p>
<p>Joseph</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joseph Wright</title>
		<link>http://www.texdev.net/2009/10/06/what-does-write18-mean/comment-page-1/#comment-1385</link>
		<dc:creator>Joseph Wright</dc:creator>
		<pubDate>Tue, 13 Oct 2009 07:10:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.texdev.net/?p=476#comment-1385</guid>
		<description>Thanks Karl and Manue for looking at the issues.</description>
		<content:encoded><![CDATA[<p>Thanks Karl and Manue for looking at the issues.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Manue Pégourié-Gonnard</title>
		<link>http://www.texdev.net/2009/10/06/what-does-write18-mean/comment-page-1/#comment-1383</link>
		<dc:creator>Manue Pégourié-Gonnard</dc:creator>
		<pubDate>Tue, 13 Oct 2009 00:04:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.texdev.net/?p=476#comment-1383</guid>
		<description>@user: we (the TeX Live team) are currently re-examining the question. (In case is wasn&#039;t already obvious from the fact that Karl answered in this thread, hence read it.)</description>
		<content:encoded><![CDATA[<p>@user: we (the TeX Live team) are currently re-examining the question. (In case is wasn&#8217;t already obvious from the fact that Karl answered in this thread, hence read it.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Karl Berry</title>
		<link>http://www.texdev.net/2009/10/06/what-does-write18-mean/comment-page-1/#comment-1379</link>
		<dc:creator>Karl Berry</dc:creator>
		<pubDate>Mon, 12 Oct 2009 22:22:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.texdev.net/?p=476#comment-1379</guid>
		<description>There are no circumstances when any \write18 text is passed to the shell unquoted.</description>
		<content:encoded><![CDATA[<p>There are no circumstances when any \write18 text is passed to the shell unquoted.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Will Robertson</title>
		<link>http://www.texdev.net/2009/10/06/what-does-write18-mean/comment-page-1/#comment-1375</link>
		<dc:creator>Will Robertson</dc:creator>
		<pubDate>Mon, 12 Oct 2009 12:00:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.texdev.net/?p=476#comment-1375</guid>
		<description>@&quot;user&quot;: please report problems with restricted shell escape on the TeX Live mailing list. Effort has been made to try and keep things both secure and convenient but here isn&#039;t the place to report that the implementers have failed at doing this.</description>
		<content:encoded><![CDATA[<p>@&#8221;user&#8221;: please report problems with restricted shell escape on the TeX Live mailing list. Effort has been made to try and keep things both secure and convenient but here isn&#8217;t the place to report that the implementers have failed at doing this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: user</title>
		<link>http://www.texdev.net/2009/10/06/what-does-write18-mean/comment-page-1/#comment-1374</link>
		<dc:creator>user</dc:creator>
		<pubDate>Mon, 12 Oct 2009 07:41:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.texdev.net/?p=476#comment-1374</guid>
		<description>Concerning overwriting files: I did say &quot;negating openout_any-restrictions&quot;. Today, by default, you can only overwrite files &quot;below&quot; the current document, or at absolute paths in $TEXMFOUTPUT. With the new version, someone will be able to overwrite every single file you have.

Concerning this being &quot;low risk&quot;: I agree that we probably won&#039;t see any worms using this method, TeX is way too small for that. However, it might very well be used to launch an attack against a specific person (researcher). Knowing that only I, or a handful others, were attacked does not comfort me.

Concerning GUIs: it shouldn&#039;t be very hard even now, just Google &quot;name-of-your-gui shell-escape&quot;.

To make it &quot;automatic&quot;, packages that require external binaries should include directives stating whatever they need, in some (yet to be specified) standard fashion. It could be a directive in the source, or a specially formatted error message (&quot;pragma-need-binary: epstopdf OR eps2pdf&quot;). The GUI would then ask the user if they want to allow binary X for this document, and if so recompile with --allowed-shell-commands=X (a new flag).

You seem to think that security issues are not real problems. I beg to differ. Didn&#039;t macros in Microsoft Word teach us anything? Of course we can have both EPS-conversion and security. That&#039;s why it is so very unfortunate that the present change makes TeX worse than the latest verison of Microsoft Word, from a security point of view.

If you look at the commits, you&#039;ll see that the developers actually tried to only include &quot;safe&quot; binaries. Unfortunately, they failed miserably. If we are to allow any automatic execution of external binaries, it should only be for a small subset of binaries that are included in the distribution of TeX. Each program should do only one simple thing, to make it easy to audit.</description>
		<content:encoded><![CDATA[<p>Concerning overwriting files: I did say &#8220;negating openout_any-restrictions&#8221;. Today, by default, you can only overwrite files &#8220;below&#8221; the current document, or at absolute paths in $TEXMFOUTPUT. With the new version, someone will be able to overwrite every single file you have.</p>
<p>Concerning this being &#8220;low risk&#8221;: I agree that we probably won&#8217;t see any worms using this method, TeX is way too small for that. However, it might very well be used to launch an attack against a specific person (researcher). Knowing that only I, or a handful others, were attacked does not comfort me.</p>
<p>Concerning GUIs: it shouldn&#8217;t be very hard even now, just Google &#8220;name-of-your-gui shell-escape&#8221;.</p>
<p>To make it &#8220;automatic&#8221;, packages that require external binaries should include directives stating whatever they need, in some (yet to be specified) standard fashion. It could be a directive in the source, or a specially formatted error message (&#8220;pragma-need-binary: epstopdf OR eps2pdf&#8221;). The GUI would then ask the user if they want to allow binary X for this document, and if so recompile with &#8211;allowed-shell-commands=X (a new flag).</p>
<p>You seem to think that security issues are not real problems. I beg to differ. Didn&#8217;t macros in Microsoft Word teach us anything? Of course we can have both EPS-conversion and security. That&#8217;s why it is so very unfortunate that the present change makes TeX worse than the latest verison of Microsoft Word, from a security point of view.</p>
<p>If you look at the commits, you&#8217;ll see that the developers actually tried to only include &#8220;safe&#8221; binaries. Unfortunately, they failed miserably. If we are to allow any automatic execution of external binaries, it should only be for a small subset of binaries that are included in the distribution of TeX. Each program should do only one simple thing, to make it easy to audit.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joseph Wright</title>
		<link>http://www.texdev.net/2009/10/06/what-does-write18-mean/comment-page-1/#comment-1365</link>
		<dc:creator>Joseph Wright</dc:creator>
		<pubDate>Sat, 10 Oct 2009 07:12:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.texdev.net/?p=476#comment-1365</guid>
		<description>I&#039;m not a developer for either MiKTeX or TeX Live, so I can only say what I imagine is the thinking.

For a single arbitrary file, you can overwrite with no warning without \write18 at all, just using TeX. After all, this is what LaTeX does with the .aux file (plus others). So there is no real difference in letting other tools that can write to a single file run. The worry is mainly real shell escape, such as &quot;cd .. &amp;&amp; rm -rf *&quot; (on Unix, of course).

I&#039;ve said before that the real risk of \write18 is pretty low (people wanting to do evil things usually find rather more general ways than via TeX)! So I personally feel the trade off here is worth it.

On thing you have to remember is most users rely on a GUI, and find it *very* confusing getting instructions like &quot;Change the parameters sent to LaTeX to include -shell-escape&quot;. Arguing that the GUI should add stuff automatically assumes that every GUI is updated to fit the scheme. What list you you go for in any case? One of the key reasons for this change is because using EPS graphics with PDF output is a *real* problem for many users. 

Joseph</description>
		<content:encoded><![CDATA[<p>I&#8217;m not a developer for either MiKTeX or TeX Live, so I can only say what I imagine is the thinking.</p>
<p>For a single arbitrary file, you can overwrite with no warning without \write18 at all, just using TeX. After all, this is what LaTeX does with the .aux file (plus others). So there is no real difference in letting other tools that can write to a single file run. The worry is mainly real shell escape, such as &#8220;cd .. &#038;&#038; rm -rf *&#8221; (on Unix, of course).</p>
<p>I&#8217;ve said before that the real risk of \write18 is pretty low (people wanting to do evil things usually find rather more general ways than via TeX)! So I personally feel the trade off here is worth it.</p>
<p>On thing you have to remember is most users rely on a GUI, and find it *very* confusing getting instructions like &#8220;Change the parameters sent to LaTeX to include -shell-escape&#8221;. Arguing that the GUI should add stuff automatically assumes that every GUI is updated to fit the scheme. What list you you go for in any case? One of the key reasons for this change is because using EPS graphics with PDF output is a *real* problem for many users. </p>
<p>Joseph</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: user</title>
		<link>http://www.texdev.net/2009/10/06/what-does-write18-mean/comment-page-1/#comment-1363</link>
		<dc:creator>user</dc:creator>
		<pubDate>Fri, 09 Oct 2009 16:00:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.texdev.net/?p=476#comment-1363</guid>
		<description>I think this is a really bad idea. We get lots of potential security issues, and the only thing we gain is not having to check some checkbox in a GUI or add a flag when using the CLI.

Looking at http://www.tug.org/svn/texlive/trunk/Master/texmf/web2c/texmf.cnf?view=markup it seems as if the &quot;safe&quot; commands are: bibtex, bibtex8, epstopdf, epspdf, fc-match, kpsewhich, makeindex, ps2pdf, pstopdf, rpdfcrop.

On my system &quot;ps2pdf valid.ps any-file&quot; will happily overwrite &quot;any-file&quot;, negating openout_any-restrictions, epspdf has a --psoptions flag whose argument appears to be added to the system() call unquoted (just had a quick look, might be wrong on that one), ...

Instead there should be a flag --allowed-shell-commands=..., with the GUIs providing defaults that they consider sensible (perhaps based on the packages used).</description>
		<content:encoded><![CDATA[<p>I think this is a really bad idea. We get lots of potential security issues, and the only thing we gain is not having to check some checkbox in a GUI or add a flag when using the CLI.</p>
<p>Looking at <a href="http://www.tug.org/svn/texlive/trunk/Master/texmf/web2c/texmf.cnf?view=markup" rel="nofollow">http://www.tug.org/svn/texlive/trunk/Master/texmf/web2c/texmf.cnf?view=markup</a> it seems as if the &#8220;safe&#8221; commands are: bibtex, bibtex8, epstopdf, epspdf, fc-match, kpsewhich, makeindex, ps2pdf, pstopdf, rpdfcrop.</p>
<p>On my system &#8220;ps2pdf valid.ps any-file&#8221; will happily overwrite &#8220;any-file&#8221;, negating openout_any-restrictions, epspdf has a &#8211;psoptions flag whose argument appears to be added to the system() call unquoted (just had a quick look, might be wrong on that one), &#8230;</p>
<p>Instead there should be a flag &#8211;allowed-shell-commands=&#8230;, with the GUIs providing defaults that they consider sensible (perhaps based on the packages used).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Will Robertson</title>
		<link>http://www.texdev.net/2009/10/06/what-does-write18-mean/comment-page-1/#comment-1357</link>
		<dc:creator>Will Robertson</dc:creator>
		<pubDate>Thu, 08 Oct 2009 06:12:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.texdev.net/?p=476#comment-1357</guid>
		<description>Yes, my understanding is that you&#039;d need an entirely separate binary. (This is what Heiko has done with (r)pdfcrop.)</description>
		<content:encoded><![CDATA[<p>Yes, my understanding is that you&#8217;d need an entirely separate binary. (This is what Heiko has done with (r)pdfcrop.)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
