Remix.run Logo
▲ Someone a day ago

Why would a tool that runs any program sent to it on a device it doesn’t know about be that concerned about being sent an invalid program?

An attacker might send a file that orders for millions of dollars of pizzas, using the fax hardware built into the printer (I’m not sure you can buy postscript printers that can fax today, but you can buy printers that can fax even today)

▲M95D 5 hours ago | parent | next [-]

That's not how a printer with a fax/modem works.

If the printer endpoint of the USB device receives a file that orders millions of pizzas, it will print the file (or print a PS error, or print the plaintext contents of the file), not order pizzas.

If the user mistakenly "prints" to the fax device, the file will be printed at the destination fax machine, at the number the user typed, not the number in the file, and it will print, not order pizzas (unless the pizzeria accepts fax orders, which would be a prank, not an attack).

▲Someone 2 hours ago | parent [-]

> That's not how a printer with a fax/modem works.

It is how at least one of them works, and how I assumed all of them work. http://www.whoopis.com/howtos/laserwriter16-600/LaserWriter_...:

“FaxOptions Dictionary This dictionary contains parameters that direct fax transmissions from a PostScript language program. Refer to “Fax Parameters” on page 29 for further information about FaxOptions defaults and the keys found in this dictionary”

Google tells me this is what you needed in your PostScript file to send a fax:

  <<
    /OutputDevice /Fax
    /FaxOptions <<
      /DialCallee (555-0199)
    >>
  >> setpagedevice

And I don’t think Apple was unique in having fax support in their PostScript. https://web.mit.edu/PostScript/Adobe/Documents/5001.DSC_Spec... mentions faxing, too (but doesn’t appear to say how to accomplish it)
▲yrjrjjrjjtjjr 16 hours ago | parent | prev [-]

I'm having trouble understanding your question in the context of the discussion, so I will talk about the topic generally instead.

Imagine a server allows you to upload images. It has a system designed for images only. It will behave unpredictably maybe even dangerously with another file. The server checks that the file ends with .jpg. it checks that the file is a valid jpeg. All clear. Upload allowed. But 5 steps later some tool looks at the image file and notices it's a valid zip file (creating files with multiple valid interpretations is something people have succeeded in doing it's not always so hard). It runs this check before the image check. The next step in the processing chain wants an image but it has been told it's dealing with a zip file. So it unzips the file to see if it contains an image. But it was a zip bomb. The server goes down.