1. Linux Running in a PDF (doompdf.dev) 114 points by theden 4 hours ago | flag | hide | 37 comments 2. Ingesting PDFs and why Gemini 2.0 changes everything (sergey.fyi) 978 points by serjester 17 hours ago | flag | hide | 323 comments As people start bolting various kinds of PDF parsers and evaluators to LLMs, there's got to be some interesting hack potential.
Linux Running in a PDF
51–60 of 116 posts
Re: Linux Running in a PDF
#52Missing from headline: It is a RISC-V VM.
Re: Linux Running in a PDF
#53Earlier quoted context omitted.
I mean if he’s searching for a good PDF reader I doubt he’ll be opening it in Adobe Reader
I had assumed it went the way of Adobe Flash many years ago.
Re: Linux Running in a PDF
#541. Linux Running in a PDF (doompdf.dev) 114 points by theden 4 hours ago | flag | hide | 37 comments 2. Ingesting PDFs and why Gemini 2.0 changes everything (sergey.fyi) 978 points by serjester 17 hours ago | flag | hide | 323 comments As people start bolting various kinds of PDF parsers and evaluators to LLMs, there's got to be some interesting hack potential.
PDFs have always been a highly attractive attack vector, because most people associate them purely with text and have no clue that you can easily embed executable code. Combine that with how atrociously many vulnerabilities there are in popular readers like acrobat, and you have a perfect gateway for getting your company hacked.
Re: Linux Running in a PDF
#55Using JS for this feels like cheating... I wonder if similar things would be possible with PostScript?
And OFC there's a chess engine in PS, a tic tac toe, and with patience you could even play NES games, but you might need to play with the stack a lot.
Re: Linux Running in a PDF
#561. Linux Running in a PDF (doompdf.dev) 114 points by theden 4 hours ago | flag | hide | 37 comments 2. Ingesting PDFs and why Gemini 2.0 changes everything (sergey.fyi) 978 points by serjester 17 hours ago | flag | hide | 323 comments As people start bolting various kinds of PDF parsers and evaluators to LLMs, there's got to be some interesting hack potential.
PDFs have always been a highly attractive attack vector, because most people associate them purely with text and have no clue that you can easily embed executable code. Combine that with how atrociously many vulnerabilities there are in popular readers like acrobat, and you have a perfect gateway for getting your company hacked.
Re: Linux Running in a PDF
#57Using JS for this feels like cheating... I wonder if similar things would be possible with PostScript?
From the computation point of view, it's possible. PostScript has integer arithmetic operations needed for x86 CPU emulation. It also has mutable byte strings, which are useful as emulated memory.
Re: Linux Running in a PDF
#58Does anyone know if running PDFs through the following filter (as in [0]) prevent malicious actors? gs \ -dNOPAUSE \ -sDEVICE=pdfwrite \ -sOUTPUTFILE=clean.pdf \ -dBATCH \ dirty.pdf [0]: https://tex.stackexchange.com/a/481609/29430
It can make things worse: Ghostscript is not particularly safe to run on untrusted/potentially malicious input. It has a giant attack surface and no proper mitigations, unlike the PDF reader in your browser. At a minimum, you'd have to sandbox it using something like gVisor.