News for hackers. Stuff that matters.
Re:Malicious Subtitles Threaten Kodi, VLC and Popcorn Time U... by viraptor on Wednesday May 24, 2017 @07:51AM (#14409275)
Not even multi-process. Threads on Linux can have their own seccomp profiles. You don't need to sandbox absolutely everything at the same time either. In this case opening the file in the main, unrestricted app and spawning a new thread that will read from the existing FD and only send you simple, time sorted messages over a shared IPC/pipe is not that crazy.

Other points may be more tricky, and it's a good list of potential issues, but we can start chipping away some stuff right now. There's a lot we can fix without fixing everything at the same time.

Re:Malicious Subtitles Threaten Kodi, VLC and Popcorn Time U... by jbk on Wednesday May 24, 2017 @07:57AM (#14409312)
> Threads on Linux can have their own seccomp profiles.

Not on Windwows or on macOS.

> new thread that will read from the existing FD and only send you simple, time sorted messages over a shared IPC/pipe is not that crazy.

Of course that does not solve anything, because your demuxer|decoders|output needs access to the FS, have access to kernel-mode and those are the dangerous parts.

Re:Malicious Subtitles Threaten Kodi, VLC and Popcorn Time U... by zeveb on Wednesday May 24, 2017 @02:58PM (#14412518)
> > Threads on Linux can have their own seccomp profiles.

> Not on Windwows or on macOS.

It's a shame, then, that Windows & macOS are holding back security improvements for software running on Linux. I understand (& even agree with!) your desire to have a sandboxing mechanism which runs acceptably on all supported systems; it's just sad that this security mechanism in the Linux kernel can't be taken advantage of in vlc.

Re:Malicious Subtitles Threaten Kodi, VLC and Popcorn Time U... by jbk on Thursday May 25, 2017 @11:03AM (#14417745)
Well, no. Because you can do it per-process. I don't see the reason of doing it per threads here.
Re:Malicious Subtitles Threaten Kodi, VLC and Popcorn Time U... by viraptor on Wednesday May 24, 2017 @08:01AM (#14409339)
I'm not sure what you're trying to say. Yes, I meant Linux. Yes, it can solve the issue of separate subtitle files, which this article is about. Read access to an existing FD is not the same as full FS access, and there's no demux involved here.
Re:Malicious Subtitles Threaten Kodi, VLC and Popcorn Time U... by jbk on Wednesday May 24, 2017 @08:04AM (#14409354)
> Yes, I meant Linux

The demo is on Windows. The goal is to do a sandbox that works on most OSes.

And, it will not solve the decoder issue, since it is on the decoding side, which still has access to the GPU/Aout and the kernel.

> Read access to an existing FD is not the same as full FS access, and there's no demux involved here.

You're totally missing the point here. The issue is demuxers/decoders/output, not really the access.

Reading from an FD or not would not solve the buffer overflow exploitation (if it was actually exploitable).

Re:Malicious Subtitles Threaten Kodi, VLC and Popcorn Time U... by dom0 on Wednesday May 24, 2017 @07:53AM (#14409283)
> Not even multi-process. Threads on Linux can have their own seccomp profiles.

Feels kinda pointless, since all threads in a process share the same memory protection.

Re:Malicious Subtitles Threaten Kodi, VLC and Popcorn Time U... by viraptor on Wednesday May 24, 2017 @07:57AM (#14409311)
They don't have to. Clone can do a lot of magic without full processes.
Re:Malicious Subtitles Threaten Kodi, VLC and Popcorn Time U... by jbk on Wednesday May 24, 2017 @08:06AM (#14409362)
But then you need to copy the memory from the decoder to the video output or you get back to the same problem to work-on.
Re:Malicious Subtitles Threaten Kodi, VLC and Popcorn Time U... by Filligree on Wednesday May 24, 2017 @08:26AM (#14409477)
No, you can use a shared memory segment for a buffer just for that.

It's more coding, certainly, but it's possible. Security is an option if we wanted it.

Re:Malicious Subtitles Threaten Kodi, VLC and Popcorn Time U... by jbk on Wednesday May 24, 2017 @08:42AM (#14409556)
That's exactly the point above. See my above comment.
Re:Malicious Subtitles Threaten Kodi, VLC and Popcorn Time U... by Filligree on Wednesday May 24, 2017 @08:57AM (#14409639)
I'm not sure, it sounds like you're saying we'd need to copy memory.

The shared memory segment can be a GPU image buffer, so I don't think that's true.

Re:Malicious Subtitles Threaten Kodi, VLC and Popcorn Time U... by jbk on Wednesday May 24, 2017 @09:03AM (#14409684)
See comment above with "the solution".

Either you need to have multi-process and correct IPC, or you need to copy.