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

Cross-site cookies still allowed despite ETP #1449

Closed
ghost opened this issue May 17, 2022 · 23 comments
Closed

Cross-site cookies still allowed despite ETP #1449

ghost opened this issue May 17, 2022 · 23 comments

Comments

@ghost
Copy link

ghost commented May 17, 2022

Hi,
I started using Arkenfox a while back with a new profile, so a clean slate in terms of permissions. I have made overrides, but nothing relating to cookies. Given this, I assume my browser's behaviour regarding cookies directly derives from the user.js.
As expected, Enhanced Tracking Protection is set to strict, which should block all cross-site cookies.
Despite this, I noticed that, on some websites, some cross-site cookies are actually approved -- with permissions that I clearly did not give. For instance, duckduckgo.com authorises cross-site cookies for support.apple.com (see attached image). In some cases, the "third party" website indicated in the permission window is the same as the website I'm on -- which means it should not be considered cross-site, and yet it is labelled as such.
Is this normal? Am I missing something?
Dan

🟪 REQUIRED INFO

  • Browser version & OS: Firefox 101 (beta), macos 12
  • Steps to Reproduce (STR): go to duckduckgo.com (also applicable to other specific websites, such as github), click on the "permissions" icon left of the URL
  • Expected result: cross-site cookies should never be allowed
  • Actual result: in specific websites, cross-site cookies are allowed
  • Console errors and warnings: nothing relevant, as far as I can see
  • Anything else you deem worth mentioning: nope

Schermata 2022-05-17 alle 13 42 51

@IkelAtomig
Copy link

Duplicate of #1448

@ghost
Copy link
Author

ghost commented May 17, 2022

Well spotted, @EdwardLangdon. So the conclusion is..... deny/revoke access manually until changes are made in FF102 (as per @Thorin-Oakenpants comments in #1441)?

@rusty-snake
Copy link
Contributor

rusty-snake commented May 17, 2022

user.js/user.js

Lines 773 to 779 in ea139e3

/* 2702: disable ETP web compat features [FF93+]
* [SETUP-HARDEN] Includes skip lists, heuristics (SmartBlock) and automatic grants
* Opener Heuristics are granted for 30 days and Redirect Heuristics for 15 minutes, see [3]
* [1] https://blog.mozilla.org/security/2021/07/13/smartblock-v2/
* [2] https://hg.mozilla.org/mozilla-central/rev/e5483fd469ab#l4.12
* [3] https://developer.mozilla.org/en-US/docs/Web/Privacy/State_Partitioning#storage_access_heuristics ***/
// user_pref("privacy.antitracking.enableWebcompat", false);

#1355

@IkelAtomig
Copy link

I am still not yet clear about the Discussion, need to look later. Rusty snake, Can you explain ?

@rusty-snake
Copy link
Contributor

Everything is working as intended.

Webcompat is enabled by default because pants want this/less breakage for users/less unnecessary reports about broken sites.

@ghost
Copy link
Author

ghost commented May 17, 2022

No sure I'm well versed enough. But what would it take for these cross-site permissions to be requested instead of just accepted (in the cases where they are accepted)?

@rusty-snake
Copy link
Contributor

If you want an request dialog like for geolocation, you need to open an ticket in mozillas bugtracker.

@privacyguy123
Copy link

privacyguy123 commented May 17, 2022

Everything is working as intended.

Webcompat is enabled by default because pants want this/less breakage for users/less unnecessary reports about broken sites.

So far all of these websites are working as intended with this option off - begs the question what is it "fixing" by allowing cross site cookies by default?

@Thorin-Oakenpants
Copy link
Contributor

Duplicate of #1448

Not a duplicate if user hasn't added a site exception for ETP or sanitizing

deny/revoke access manually until changes are made in FF102

  • what 102 change? If you mean when we move off lifetime cookie pref, that has nothing to do with this or 1448
  • revoking manually means you're just undoing your exceptions (if you added one, e.g. 1448)

My understanding was that nothing is allowed unless user initiated. And we allow compat because without it you can't use the d in dFPI or benefit from the shims

includes skip lists, heuristics (SmartBlock) and automatic grants

I did try, from memory to work out what automatic grants were, IDK, so much F shit for me to always answer and read ands learn about

@ghost
Copy link
Author

ghost commented May 18, 2022

Indeed, no exceptions had been made for the websites where these cross-site cookies are found to be allowed.

From a link in the discussion of #1448, I see the following (taken from FF Help website):

While cross-site cookies from trackers are blocked in Firefox by default, a site may signal to the browser that it needs to use them for important functionality. In this case, Firefox will allow a third-party website to use cross-site cookies the first five times (or up to 1% of the number of unique sites you visit in a session, whichever is larger) without prompting you.

If I get this right, then this whole thing is not a bug, but just the very design of dFPI and there isn't much one can do, apart from ditching dFPI entirely. Is that right?

I guess it just feels like the heuristics work in mysterious ways, as I remain quite unsure as to how/why Duckduckgo needs to connect to Apple support for an important functionality...

@fxbrit
Copy link
Collaborator

fxbrit commented May 18, 2022

how/why Duckduckgo needs to connect to Apple support for an important functionality...

for the record I couldn't reproduce this, even uBO shows no Apple script or anything.

@cryptocat8
Copy link

This thing even happens when I use starpage Anonymous view (sometimes)

@ElectricityMachine
Copy link

Just wanted to confirm this as well, it's happened to me, albeit with a different website. I have a cookie exception for DuckDuckGo for settings, but it still happens when I remove the exception, save changes, and restart. I confirmed that cookies were removed since the theme went from dark to light in DDG. I don't really know how to reproduce this reliably, but will try in another profile.

Before removing exception:
37scjejU53

After removing exception:
sZdKnRl8OD

@Thorin-Oakenpants
Copy link
Contributor

I have a cookie exception for DuckDuckGo

so duplicate of #1448

Here's my FF with no cookie exception
trackers

@remyabel2
Copy link

FWIW I run into this issue even though I don't have a cookie exception for duckduckgo. The sites listed seem to be sites I have visited from search results and it doesn't happen consistently, I notice it randomly and have to clear the permissions everytime.

@remyabel2
Copy link

Screenshot from 2022-08-11 14-41-26

Here is an example after I visited a reddit domain. I don't have cookie exceptions for either.

@rusty-snake
Copy link
Contributor

I can not reproduce this yet with my config, but I did saw it on other devices.
Where does the "Learn more" link brings you? What does it talk about?

To remember you call, there is Opener Heuristics.

If you click on the a tag, it is a link

Bildschirmfoto vom 2022-08-11 20-48-39-fs8

but if you click on the article tag the "link" is implemented via onclick possible using some API that triggers Opener Heuristics under some conditions (IDK which but FF sometimes shows a blocked pop-up banner on DDG when clicking on search results, maybe these are the same. Maybe timing?)

Bildschirmfoto vom 2022-08-11 20-47-43-fs8

@rusty-snake
Copy link
Contributor

@remyabel2
Copy link

I can not reproduce this yet with my config, but I did saw it on other devices.

I don't have any overrides regarding cookies/storage/webcompat so no idea why some people can reproduce it and others can't.

Where does the "Learn more" link brings you? What does it talk about?

Yes I linked to it here: #1448 (comment) The reason why it's confusing is because there's theoretically no reason why DDG would need those permissions, especially without exceptions.

but if you click on the article tag the "link" is implemented via onclick possible using some API that triggers Opener Heuristics under some conditions (IDK which but FF sometimes shows a blocked pop-up banner on DDG when clicking on search results, maybe these are the same. Maybe timing?)

This is good information. I can only reproduce it on DDG as far as I can tell, so I have no doubt that they are doing something weird. Their privacy policy does mention using local storage and tracking clicks for anonymous analytic purposes, so that may have something to do with it. It may be possible to confirm this by browsing their HTML version of the site for a while and seeing if the problem persists.

@rusty-snake
Copy link
Contributor

The reason why it's confusing is because there's theoretically no reason why DDG would need those permissions, especially without exceptions.

How should Firefox know this? It uses a heuristic.

A heuristic … is any approach to problem solving … that employs a practical method that is not guaranteed to be optimal, perfect, or rational, but is nevertheless sufficient for reaching an immediate, short-term goal or approximation. Where finding an optimal solution is impossible or impractical, heuristic methods can be used to speed up the process of finding a satisfactory solution.

It does not understand what the code does or need, it just detects patterns which indicated that it might need this permissions.

I can only reproduce it on DDG as far as I can tell,

I also saw it on other sites but can't remember which. However, if DDG is your primary search engine you use it a lot and open a lot third-party links from it, so it is expected to see it there more often.

Also it may depend on the code of the site you open? IDK.
If someone wants to look in the implementation of the heuristic, go for it...

@rusty-snake
Copy link
Contributor

Found some STR:

And in deed it's Opener Heuristics (turning it off breaks this STR).

@ElectricityMachine
Copy link

I was able to reproduce this every time using the steps by rusty-snake. Are there any downsides to disabling Opener Heuristics?

@rusty-snake
Copy link
Contributor

Broken SSO-Login for some services and other potential cross site authentification problems.

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

8 participants