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

Add fingerprinting section to PTZ explainer #231

Merged
merged 3 commits into from
Jul 3, 2020

Conversation

beaufortfrancois
Copy link
Contributor

No description provided.

@beaufortfrancois beaufortfrancois force-pushed the fingerprinting branch 2 times, most recently from 2deb7d6 to 196d982 Compare June 30, 2020 09:14
constraints as "ideal" in `getUserMedia` as suggested in
[#229](https://github.com/w3c/mediacapture-image/issues/229).

1. A malicious website could set pan, tilt, and zoom to minimally different values

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this scenario can be expanded beyond just an evil.com maintaining its own state into an evil.com 3P plug-in that enables leaking the HW state across origins.

E.g., if origins A and B both simultaneously open media streams where A sets PTZ to values {X, Y, Z}, while B reads the current PTZ state, A can leak a large number of bits to B, enabling correlating user IDs between origins.

If these bits are only accessible after the top-level origin has permissions to use the camera, that may not be that bad. Still worthwhile mentioning IMO.

I'm also interested in @JensenPaul's opinions on this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if origins A and B both simultaneously open media streams where A sets PTZ to values {X, Y, Z}, while B reads the current PTZ state

It seems not great that two different web pages get access to the PTZ at the same time. Should that be prevented? Safari is for instance muting a page capture if a new page starts to capture.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the hint @youennf
I've just tried it and Safari indeed "pauses" camera feed when camera is accessed from another page to avoid this issue. Note that this is not exposed to web developers though: the mediastreamtrack is not "ended".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm about to add this to the explainer. WDYT?

1. Websites from different origins could share pan, tilt, and zoom real-time values during a media session. A way of mitigating this would be to allow only one origin at a time to access and control camera PTZ.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this is not exposed to web developers though: the mediastreamtrack is not "ended".

This is exposed using mute/unmute events. User Agent UI allows unmuting a given page, hence why tracks do not get ended.

Your description sounds like a good addition to me. The notion of origin is a bit vague for third-party iframes in that context but that could be refined later on. I would also mention the possibility to restrict to one top-level browsing context at a time.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @youennf! Pausing the input (from camera, PTZ, etc) makes sense to me as a proper mitigation. Does that mean that only the foreground tab gets the actual stream input?

In the case of PTZ, it would also mean that the values should be reset to the ones previously set by the origin that can access the data. Essentially, we should treat the PTZ settings as a cached value and isolate that cache to the top-level origin.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does that mean that only the foreground tab gets the actual stream input?

Safari does not automatically mute/unmute when user switches tabs but I could see other implementations doing so. This is User Agent land really. The spec could say when to mute (for instance if PTZ capture starts/restarts) and leave the exact unmute heuristic to the User Agent.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@youennf Based on your feedback I've added e39be06. WDYT?

@riju riju added PTZ Pan-Tilt-Zoom privacy-tracker Group bringing to attention of Privacy, or tracked by the Privacy Group but not needing response. labels Jun 30, 2020
Copy link
Collaborator

@riju riju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@engedy / @andypaicu : Should have a look also.
Maybe out of scope for an explainer, but we can learn from Privacy folks if we can estimate how many entropy bits are added to the fingerprinting vector due to PTZ capability using tools like https://panopticlick.eff.org/

ptz-explainer.md Outdated Show resolved Hide resolved
@beaufortfrancois
Copy link
Contributor Author

Note that I've started a separate PR for the security section of the PTZ explainer at #232

@beaufortfrancois
Copy link
Contributor Author

@riju please merge.
It looks good to @reillyeon and @engedy as discussed offline.

One nit, we may want to rename "fingerprinting" section to "privacy mitigations" in the future.

@riju riju merged commit 1e22e10 into w3c:master Jul 3, 2020
@beaufortfrancois beaufortfrancois deleted the fingerprinting branch July 3, 2020 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
privacy-tracker Group bringing to attention of Privacy, or tracked by the Privacy Group but not needing response. PTZ Pan-Tilt-Zoom
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants