Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FF70 + VP9 #819

Closed
Thorin-Oakenpants opened this issue Oct 23, 2019 · 10 comments
Closed

FF70 + VP9 #819

Thorin-Oakenpants opened this issue Oct 23, 2019 · 10 comments

Comments

@Thorin-Oakenpants
Copy link
Contributor

@Dragomir7 said

In version FF70, I discovered new suspicious functionality related to youtube. When user use youtube video in first time it create folder mediacapabilities with two files (data.mdb and lock.mdb) inside folder ******.default-release. In previous versions FF, this was not. I tested a little and found out that it is connected with youtube codec vp9 (webm). You can stop it just by switching pref media.mediasource.webm.enabled to false. But unfortunately after that the maximum resolution that can be selected in youtube player is 720p. I haven’t found another way to stop creating folder :( . Knowing the close collaboration of google and mozilla ... I think it's better to find a way to disable the creation of a folder without harming the functionality of youtube.
What do you think about this?

@Thorin-Oakenpants
Copy link
Contributor Author

First of all, cut this out: "Knowing the close collaboration of google and mozilla" .. if you seriously believe that then you're deluded

Now down to business. We'll have to do some testing etc to confirm everything I guess. It's a shame TB didn't get this and we could lean on their results. For example they made media cache memory only and bumped up the memory space allocated for it. But first I would want to know what is in that database. Is it permanent? Is it isolated by first party? Is it session only? Etc.

Downgrading resolution isn't the answer - besides, your media capabilities fingerprint will change, and that's about 20ms of JS code to do that (and easily deployed). And neither are solutions outside of the application (such as crssi's suggestion), sure it might work but it's not universal and applied easily. What happens on Mac, on Linux, on Android etc?

And I would want to see what happens in PB mode. What happens when you block cookies. What happens when you go disk cacheless, etc.

So first: is it an actual threat? Can you bypass it by watching YT in PB mode? etc. etc. etc. If I get around to this by Xmas, I'll be doing well.

@ghost
Copy link

ghost commented Oct 23, 2019

So first: is it an actual threat?

Such a probability exists. Only youtube site create this folder. I tried several other video hosting services (even porn) and nothing. So it can be used for user identification. Notice it override master switch media.media-capabilities.enabled. I could be wrong and pref media.media-capabilities.enabled;false still work and this folder it's only an echo from override.

Can you bypass it by watching YT in PB mode?

No. It is created anyway.

I`m always use:

network.cookie.cookieBehavior;2
dom.storage.enabled;false
dom.indexedDB.enabled;false

and always remove // from all pref in user.js

I'll try to play some more with media.cache.* prefs. Maybe help.

@ghost
Copy link

ghost commented Oct 23, 2019

Is it deleted after your PB mode session? If not, then it sounds like a PB mode bug that someone didn't think of.

No. Folder permanent.

OK. So other sites could also do this. I guess it depends on what is it in, and what Firefox allows to be put in it, etc: i.e does it pose a privacy risk?

IDK the answers, sorry. I've already pinged Tom, so Netflix and chill 😁

Im sorry. Im not using paid services like Netflix etc. Before FF felt great without this folder. I am always suspicious of such things.

@ghost
Copy link

ghost commented Oct 23, 2019

Ok. Some new testing information:

Changing media.cache.* has no effect. Folder still creating after video starting.

If disable ALL webm in browser and enable mp4 instead, youtube create folder. But others video hostings sites which use mp4 codec not create this folder. Why is that? Why youtube video player can create this folder but others are not allowed? Where do such privileges come from and why are they generally given exclusively youtube player? Too suspicious.

@Thorin-Oakenpants
Copy link
Contributor Author

Using my nightly 72, I loaded up youtube and opened a vp9 video and hit HD for 1080. This is not a totally scientific test, as I forgot to filter for all files while watching, and missed what happened when I first started the HD video. Two files were modified, both definitely on close (not sure if relevant, but I have everything set to clear on close: everything)

mdb-files

We can ignore the lock files. Looking at the mdb databases we have

  • security_state
  • notification_store
  • xulstore
  • mediacapabilities

Wonder what stuff gets packed into these files. I'm going to guess there is zero privacy concern, and these are normal files used by FF internally. Might try and have a peek in them

@Thorin-Oakenpants
Copy link
Contributor Author

  1. Websites cannot access this info: the directories and permissions are out of scope etc
  2. see 15779760 as an example of twitter also triggering mediacapabilities/data.mdb writes - i.e it is not website driven, it is content driven and controlled by Firefox

Closing all of this as a waste of my time

@KOLANICH
Copy link

KOLANICH commented Oct 24, 2019

data.mdb
lock.mdb

The filenames look like the files are used by either BerkleyDB (a legacy embedded DB used for example in rpm) or its fork LMDB (an extremily fast key-value database used in highload services). Searching bugzilla has confirmed that firefox uses LMDB. IDK what is the reasons to use it in a video codec. I personally don't watch youtube in browser, so I cannot check. But you may want to try to open these files with LMDB, it has python bindings. You may also want to try to search dxr and the codec source code for usage of lmdb.

@Thorin-Oakenpants
Copy link
Contributor Author

Thorin-Oakenpants commented Oct 25, 2019

https://www.ghacks.net/2019/10/22/firefox-70-0-release-information/#comment-4442555

  • media.mediacapabilities.from-database = false

Well at least we can find the ticket now we have a pref and find out whats stored in there. When I say "we", I meant anyone else who is interested

https://bugzilla.mozilla.org/show_bug.cgi?id=1530996

@KOLANICH
Copy link

Thanks.

@theWalkingDuck
Copy link

media.mediacapabilities.from-database = false

Has anyone tested this on Linux ?
It dosen't work for me.

  • I set the pref to false
  • deleted the mediacapabilities directory
  • restarted firefox.

but it gets created
Did I miss something ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants