Live data from Hacker News

Malicious Subtitles Threaten Kodi, VLC and Popcorn Time Users

blog.checkpoint.com

81–90 of 234 posts

Re: Malicious Subtitles Threaten Kodi, VLC and Popcorn Time Users

#81
post #71

Earlier quoted context omitted.

AFAIK, fonts aren't a passive format, they contain code which executes in a VM.

At least SRT files are a purely declarative sequence of lines with "time time text".

But SSA is not. It's specifying a font and sometimes even shipping a font inside the SSA file.

Re: Malicious Subtitles Threaten Kodi, VLC and Popcorn Time Users

#82
post #22

Earlier quoted context omitted.

Ha, the famous sandboxing remark. I wish it was that simple! So, let me share some light on the sandboxing for multimedia (I work on VLC). If you sandbox an application like VLC, in the current way of doing sandboxing, which we've done for macOS, WinRT/UWP, and snaps, you still need a lot of permissions. Namely: - you need to be able to open files without user interactions (no file picker), in order to open playlist,…

You actually don't NEED a lot of these things I'm perfectly fine with a default / embedded font. I don't have an optical drive A database can be in the local app storage. I'm fine opening a subtitle file myself. Why would I need IPC? Why would I need to unzip anything? If it's subtitle files, it can be done in-memory. Are you sure we need low-level audio? I don't have a remote, so I'd like it to be disabled by defaul…

Those restrictions work for you, but would make VLC borderline useless for me.

> I don't need any access to the network.

90+% of what I use it for comes from my NAS or the Internet.

> I don't have an optical drive

Most of the rest is from optical discs.

> I'm perfectly fine with a default / embedded font. [...] I'm fine opening a subtitle file myself.

It's _fine_ but far from ideal. Both are useful quality of life features.

> Why would I need to unzip anything?

Non-essential, but being able to play video from a ZIP is a useful feature.

Re: Malicious Subtitles Threaten Kodi, VLC and Popcorn Time Users

#83
post #60

Earlier quoted context omitted.

Sure, but then you need a multi-process sandbox, and it's not easy to do. And the performance is not easy to obtain.

You can co-opt Chromium's. I've been doing that with a project I'm working on and it has worked quite well. I'm also not sure where you'd lose much performance. If you hand the file handles/sockets and backbuffer to the renderer, you only need enough IPC to synchronize the drawing. Sending small messages on the order of 100 times per second between processes is not going to be a bottleneck.

But you need to pass data from the access to the stream_filter, from the stream_filter to the demuxer, from the demuxer to several decoders, from the decoders to potentially a few video-filters and chroma-converters, and then finally to the output. Each of them need different access policies, and several of them require FS access.

It is not easy. If it was, people would have done it already.

Re: Malicious Subtitles Threaten Kodi, VLC and Popcorn Time Users

#84
post #62

Earlier quoted context omitted.

A media player is rarely that simple. Before writing to the GPU you have to access the content (file, network), demux, then decode and finally display. The most dangerous areas are the demuxers and decoders so they have to be sandboxed. So yes, you're right, but this doesn't solve the problem of moving the buffers between processes.

You can share file handles/sockets on Windows/OSX/Linux via IPC without giving the renderer process the ability to open the files/sockets themselves.

But that's just ONE of the issues. The issue here is that the decoder/parser is in a process that has a too many privileges...

Re: Malicious Subtitles Threaten Kodi, VLC and Popcorn Time Users

#85
post #22

Earlier quoted context omitted.

Ha, the famous sandboxing remark. I wish it was that simple! So, let me share some light on the sandboxing for multimedia (I work on VLC). If you sandbox an application like VLC, in the current way of doing sandboxing, which we've done for macOS, WinRT/UWP, and snaps, you still need a lot of permissions. Namely: - you need to be able to open files without user interactions (no file picker), in order to open playlist,…

> Probably do a multi-process media player, like Chrome is doing, with parsers and demuxers in a different process, and different ones for decoders and renderers. Knowing that you probably need to IPC several Gb/s between them. That's not actually how Chrome's renderer sandboxing works. Both Windows and OS X allow you to share a GPU-resident texture between processes (DXGI shared surfaces and IOSurface respectively),…

But you need to pass data from the access to the stream_filter, from the stream_filter to the demuxer, from the demuxer to several decoders, from the decoders to potentially a few video-filters and chroma-converters, and then finally to the output. Each of them need different access policies, and several of them require FS access.

The last part is just one of the issues, very far from all of them.

Seriously, stop thinking that noone has given a thought to the question...

Re: Malicious Subtitles Threaten Kodi, VLC and Popcorn Time Users

#86

Was annoying to find the details. Looks like PopcornTime was rendering subtitle text as HTML, inside their app (html/js-based), creating an XSS vector (looking at https://github.com/popcorn-official/popcorn-desktop/commit/a... , https://github.com/butterproject/butter-desktop/pull/602 ). Likely the javascript runtime they're using allows file access and execution of arbitrary executables, enabling the metasploit shel…

Thank you! I was frustrated when I saw this last night and it didn't contain any details. I assumed buffer overflow but different attacks for each is more interesting.

Re: Malicious Subtitles Threaten Kodi, VLC and Popcorn Time Users

#87
post #35

does this work on Linux and Mac OS? or is it limited to Windows systems?

I can't say for these vulns specifically, but in general, if software is vulnerable on one OS, it is very likely also vulnerable on other OSs. The differences aren't that big. Exploits generally have to be written for each OS separately, though.

Re: Malicious Subtitles Threaten Kodi, VLC and Popcorn Time Users

#88
post #79

Earlier quoted context omitted.

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.

That's exactly the point above. See my above comment.

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 Users

#89
post #32
post #6

What about mpv? That's my preferred video player.

While I too prefer mpv, I suspect that there are plenty of vulns in that player.

It's written in C, so I imagine that's almost guaranteed. In this case obscurity helps to protect you, however.

Re: Malicious Subtitles Threaten Kodi, VLC and Popcorn Time Users

#90
post #83

Earlier quoted context omitted.

You can co-opt Chromium's. I've been doing that with a project I'm working on and it has worked quite well. I'm also not sure where you'd lose much performance. If you hand the file handles/sockets and backbuffer to the renderer, you only need enough IPC to synchronize the drawing. Sending small messages on the order of 100 times per second between processes is not going to be a bottleneck.

But you need to pass data from the access to the stream_filter, from the stream_filter to the demuxer, from the demuxer to several decoders, from the decoders to potentially a few video-filters and chroma-converters, and then finally to the output. Each of them need different access policies, and several of them require FS access. It is not easy. If it was, people would have done it already.

You can get most of the security people are asking for without that level of granularity. If the decoder is exploited and is able to attack the demuxer, that's still worlds better than the decoder being able to run with full user privileges.

Do any of those components need unrestricted/unpredictable file access? Because if they don't you can just open the files in the main process that handles the UI and send them to the sandboxed process via IPC. None of Windows/OSX/Linux do permission checks when file handles are read from, they only check when the file is initially opened.

Post reply on HN