logoalt Hacker News

verdvermtoday at 5:27 PM4 repliesview on HN

Is embedding executable code into a file a security risk? My assumption is a yes


Replies

mirashiitoday at 5:29 PM

That would be why it chose a VM that is explicitly designed for sandboxing rather than native executable code or similar, the risk can be minimized by reducing the surface area available to that executable code to almost nothing.

show 1 reply
mslatoday at 5:36 PM

> Is embedding executable code into a file a security risk?

Yes, which is why nobody uses PDFs.

show 2 replies
nine_ktoday at 5:41 PM

TrueType and OpenType fonts include code executed by a VM to even render them. This wasn't a viable source of attacks so far, due to the properly limited nature of the VMs.

Maybe I would pick the eBPF VM instead, with all its limiting and verifying mechanics.

show 2 replies
gavinraytoday at 5:30 PM

There is no concept of "executable" vs "non-executable" content in a file.

A file is a bag of bytes. You can send those bytes to different things, like a text editor's content-stream, or as the input to a WASM interpreter.

What you decide to do with the bytes in a file is your own prerogative. Each byte is whatever you make of it.

show 5 replies