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

Deactivate the blink cache? #1554

Closed
uazo opened this issue Oct 15, 2024 · 4 comments
Closed

Deactivate the blink cache? #1554

uazo opened this issue Oct 15, 2024 · 4 comments
Labels
bug Something isn't working privacy issue fingerprinting detected!

Comments

@uazo
Copy link
Owner

uazo commented Oct 15, 2024

It seems that blink's in-memory cache has a different logic than the http cache, and probably the Partition-Blink-memory-cache.patch patch is not completely correct.
Thanks to a failed dcheck in v130, I noticed that blink performs, in chromium, a cache distinguishing only the url, without performing any partitioning: the patch that generates the top-frame-url partitioning fails because the top-frame url is no longer passed and the frame initiation url is inserted instead.

now, from the code it seems that the in-memory cache was inserted for handling the data url without having to go through the mojo call to the network stack, but, checking in debug, it is also called for other files, especially images.

the hypothesis is that it might not be correct to partition, indeed, it seems that it is better not to use the blink cache at all, because the various flags that manage the http cache seem not to be evaluated (and in cromite the flags say that the http cache is partitioned by top-frame + cross-site bit + initiatior url). Moreover, the presence of a resource in that cache could be found by a timing attack.

It is true that, again in cromite, any exploitation of the blink cache to pass information between cross-site frames is mitigated by strict site-per-process isolation, since cross-site frames are locked and OOPIF, but in chromium (and in brave :) it is not, if, as I think, blink's memory is by process.
if this is the case and thus the data urls are shared within the same process, it should be checked whether it is possible to exploit base64 forgiving to exchange data bits cross-site (but I don't think).

@uazo uazo added the privacy issue fingerprinting detected! label Oct 15, 2024
uazo added a commit that referenced this issue Oct 15, 2024
@uazo
Copy link
Owner Author

uazo commented Oct 19, 2024

this is the current situation. cromite (v130.0.6723.59-00f5239a3c15b6c898b246664f654c19f25b9122) fails in privacytests.org cache tests, in both debug and prod, I don't understand how I missed it:

Details

image

the problem is the memory cache of blink, by deactivating it completely I pass the tests.

the question is, why? now I'll do some tests and post the results.
is blink's memory really per process? why do privacytests.org and privacytests2.org share the cache if they are theoretically in two different processes? there is something I don't understand.

@uazo
Copy link
Owner Author

uazo commented Oct 19, 2024

found the bug, it is because of:

I don't understand how I missed it:

I also realised this, https://issues.chromium.org/issues/359910398 change the behaviour if the developer tools are connected and when I tested it I probably always had it open!

is blink's memory really per process?

I confirm, it is by process.

why do privacytests.org and privacytests2.org share the cache if they are theoretically in two different processes?

no, the problem was that the top-origin-url was not set in the workers.
use of the initiator url is incorrect for the cache identifier, unless the fetches are controlled by a service worker.
the problem is that the choice of identifier should not be blink's but the browser's. so, I have ruled out the use of the memory cache for service workers, since have the guarantee, on the blink side, of the security source is complex (the Chromium team is still working on it requesting it on the browser side).

uazo added a commit that referenced this issue Oct 20, 2024
@uazo uazo added the bug Something isn't working label Oct 21, 2024
@uazo uazo closed this as completed Oct 22, 2024
@uazo
Copy link
Owner Author

uazo commented Oct 22, 2024

for example https://privacytests.org/me.html
you must enable all pop-ups.

@uazo
Copy link
Owner Author

uazo commented Oct 22, 2024

Hmm, weird. Maybe it's the web fonts issue?

Weird what? That result is exactly what I expect. what is your doubt?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working privacy issue fingerprinting detected!
Projects
None yet
Development

No branches or pull requests

1 participant