Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > alt.os.linux > #51576
| From | Paul <nospam@needed.invalid> |
|---|---|
| Newsgroups | alt.os.linux, alt.os.linux.ubuntu |
| Subject | Re: A problem with "convert" - security related |
| Date | 2018-11-10 23:26 -0500 |
| Organization | A noiseless patient Spider |
| Message-ID | <ps8b26$n7q$1@dont-email.me> (permalink) |
| References | <ps5g64$dqn$1@gioia.aioe.org> <ps657g$cn$1@dont-email.me> <ps73u6$t0r$1@gioia.aioe.org> <ps7kj3$r8a$1@dont-email.me> <ps8548$gq1$1@gioia.aioe.org> |
Cross-posted to 2 groups.
Paulo da Silva wrote:
> Às 22:03 de 10/11/18, Paul escreveu:
>> Paulo da Silva wrote:
>>> Às 08:34 de 10/11/18, stepore escreveu:
>>>> On 11/09/2018 06:35 PM, Paulo da Silva wrote:
>>>>
>>>>
> ...
>>> My problem is mainly to understand what are the risks of such utility
>>> (convert) for having those restrictions in the policy file.
>>> In particular, why is (or may be) it "dangerous" allowing write to pdf
>>> files!
> ...
>
>> The reference to Ghostscript, comes from the ability to modify
>> files in the file system using PostScript.
>>
>> The fix many years ago, was to add a parameter to the command
>> line for a gs run, which would prevent that. The scripts that come
>> with the GhostScript package, have been using that parameter
>> for more than ten years.
>>
>> There should be no danger creating a file, as when Imagemagick
>> does it. If Imagemagick calls an already-installed gs, one with
>> compromised files in the installation, then just about anything
>> could happen. (This is true of doing anything on a computer.
>> Maybe my copy of "listdir" has been modified by a bad actor...)
>>
>> When you run "convert", you're not running it elevated,
>> so from a process point of view, the risk should be smaller.
>> It should not be able to modify anything in the root account
>> directory.
>>
>> *******
>>
>> https://www.mankier.com/1/gs
>>
>> Safer Mode
>>
>> The -dSAFER option disables the "deletefile" and "renamefile"
>> operators and prohibits opening piped commands ("%pipe%cmd") ...
>>
>> These would be issues with later usage of .ps or .pdf files,
>> and how any viewer or printing process handles documents.
>>
>> In general, since PDF can also contain Javascript, there is
>> more than one attack surface present. In Acrobat (reader), there is
>> a tick box to turn off support for Javascript when viewing PDFs.
>>
>> The PDF that "convert" makes, should be a pretty simple construct,
>> as all it needs to do is make an image stream from the image file,
>> and place page information around the top and bottom of the
>> page definition. There should be nothing about the file itself
>> which is dangerous.
>>
> If I correctly read your post I think that those issues only occur
> during reads, not creating/writing new pdf's from images.
>
> Thanks
I agree it doesn't make any sense. Not on writes.
It's a reading/interpreting issue.
One of the reasons these capabilities existed in the first
place, is some laser printers had "resident" fonts. These
may have been stored on a hard drive inside the laser printer.
At the time, flash (NOR) memory was too expensive to hold
the fonts.
You could send a specially formulated .ps print job, to send
a font to the printer. I've never done it, but heard you
could do such a thing at the time.
Some file capabilities existed in PostScript, that might not
have been there, if it wasn't for the printer requirement.
Today, we send embedded fonts in documents, so a printer
with resident fonts isn't as necessary. The embedded font
is a subset. I have document samples here, where a font table
only has one character in it, as an example of how few characters
they're willing to embed when sending them with the document.
Paul
Back to alt.os.linux | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
A problem with "convert" - security related Paulo da Silva <p_s_d_a_s_i_l_v_a_ns@netcabo.pt> - 2018-11-10 02:35 +0000
Re: A problem with "convert" - security related Paul <nospam@needed.invalid> - 2018-11-10 00:15 -0500
Re: A problem with "convert" - security related stepore <linshine@here.now> - 2018-11-10 00:34 -0800
Re: A problem with "convert" - security related Paul <nospam@needed.invalid> - 2018-11-10 07:32 -0500
Re: A problem with "convert" - security related Paulo da Silva <p_s_d_a_s_i_l_v_a_ns@netcabo.pt> - 2018-11-10 17:19 +0000
Re: A problem with "convert" - security related Paul <nospam@needed.invalid> - 2018-11-10 17:03 -0500
Re: A problem with "convert" - security related Paulo da Silva <p_s_d_a_s_i_l_v_a_ns@netcabo.pt> - 2018-11-11 02:45 +0000
Re: A problem with "convert" - security related Paul <nospam@needed.invalid> - 2018-11-10 23:26 -0500
Re: A problem with "convert" - security related "Carlos E. R." <robin_listas@es.invalid> - 2018-11-12 14:17 +0100
Re: A problem with "convert" - security related Paul <nospam@needed.invalid> - 2018-11-12 09:21 -0500
Re: A problem with "convert" - security related "Carlos E. R." <robin_listas@es.invalid> - 2018-11-12 17:09 +0100
csiph-web