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

navigator.hardwareConcurrency serves as a fingerprinting vector #4129

Closed
riastradh-brave opened this issue Apr 16, 2019 · 7 comments
Closed
Labels
closed/duplicate Issue has already been reported feature/shields/fingerprint The fingerprinting (aka: "device recognition") protection provided in Shields privacy privacy-pod Feature work for the Privacy & Web Compatibility pod

Comments

@riastradh-brave
Copy link
Contributor

We should fix it to a certain number to plug this vector.

However, there's an issue: if a script can (a) run CPU-intensive computations in parallel, and (b) measure time, then the script can estimate the number of CPUs using those two tools. So this goes a little deeper. But we can at least plug the easy fingerprinting vector.

@riastradh-brave riastradh-brave added the feature/shields/fingerprint The fingerprinting (aka: "device recognition") protection provided in Shields label Apr 16, 2019
@riastradh-brave
Copy link
Contributor Author

Related: #2471

@pes10k
Copy link
Contributor

pes10k commented Aug 9, 2019

related: #2655

@bershanskiy
Copy link

FYI, Mozilla spoofs navigator.hardwareConcurrency = 2 when privacy.resistFingerprinting = true.
Source: https://bugzilla.mozilla.org/show_bug.cgi?id=1360039
Also, I just tested it and it is still the case.

Should this API be removed entirely, removed when shields are on or spoofed when shields are on?

I personally favor complete removal (even with shields down) because I can't think of a legitimate use for it and Safari does not have it (so web compatibility should not be an issue).

@pes10k
Copy link
Contributor

pes10k commented Oct 12, 2020

Fixed by #10808

@pes10k pes10k closed this as completed Oct 12, 2020
@pes10k pes10k added closed/duplicate Issue has already been reported privacy privacy-pod Feature work for the Privacy & Web Compatibility pod labels Oct 12, 2020
@angryziber
Copy link

@bershanskiy just noticed that Brave returns wierd numbers here :-(
The use case is simple: for parallel computations using Workers, you determine the number of workers to run...

@pes10k
Copy link
Contributor

pes10k commented Oct 13, 2020

Howdy @angryziber , you might find the specific details here useful #10808

Mainly the thinking is:

  1. this is a clear fingerprinting vector; there is just no way we're going to leave it unmodified
  2. it doesn't actually affect the number of workers that run
  3. Sites should already be conservative with the number of workers they're spinning up; its rare that any site is the only tab open :)
  4. If users are on a site they trust, and need to enable uncommon uses on the web (i.e. they really want to lite up all their cores bc of a site they're on), the right thing for them to do in brave is to drop shields

Hope that helps explain the thinking behind Brave's approach!

@angryziber
Copy link

@pes10k thanks for the response.

There is actually a difference between apps and web sites. Very specific web-basedd apps sometimes need to spin max number of workers. I am developing one, and it involves quite a lot of computations to analyze year-round shadows for solar roofs. But I guess users need not to forget to remove shields for the apps they rely on?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed/duplicate Issue has already been reported feature/shields/fingerprint The fingerprinting (aka: "device recognition") protection provided in Shields privacy privacy-pod Feature work for the Privacy & Web Compatibility pod
Projects
None yet
Development

No branches or pull requests

4 participants