Closed Bug 2000429 Opened 10 months ago Closed 9 months ago

Fingerprinting protection breaks some fonts on Instagram, Facebook, X, YouTube (and probably other websites)

Categories

(Core :: Privacy: Anti-Tracking, defect, P3)

defect

Tracking

()

RESOLVED FIXED
148 Branch
Tracking Status
firefox-esr115 --- wontfix
firefox-esr140 --- fixed
firefox145 --- wontfix
firefox146 --- fixed
firefox147 --- fixed
firefox148 --- fixed

People

(Reporter: soeren.hentzschel, Assigned: tjr, NeedInfo)

References

Details

(Keywords: regression, regressionwindow-wanted)

Attachments

(7 files)

Attached image broken font

Some fonts are broken on several websites like Facebook or X, where "special" fonts are used. This does happen with the "strict" tracking protection, but not with the "standard" tracking protection. Using the "strict" tracking protection and then setting privacy.fingerprintingProtection to false solves it as well. Enabling the checkboxes to fix major or minor site issues does not help.

I can reproduce the issue with Firefox Nightly on two different MacBooks with macOS 26.1 since at least a few weeks and tried to find a regression. But with mozregression, I was neither able to reproduce it with a new profile nor with my affected profile.

As a next step, I tried https://github.com/mozilla-extensions/fingerprinting-protection-debugger and was able to find out that the fonts are broken if FontVisibilityLangPack is enabled, and work once I disable this option.

The Inspector developer tool shows the following font for the affected text in the broken state:

.SF NS
System Font

The same check if the font works:

.SF NS
System Font

STIX Two Math
STIX Two Math Regular

Example facebook post: https://www.facebook.com/stunde0/posts/pfbid02arHDEvV3EsUyvrpeTqRvxNEDqfBGnTJ4ABSFsfBZdFYcb7NBNAMuPJpkUpBR5Vykl

I'll attach two screenshots. The first shows the mentioned Facebook post in the broken state. The second screenshot will show the same post without this problem.

Attached image expected result
Flags: needinfo?(tom)

Thank you for the very well written report. That's curious, I will see if I can reproduce it on my Mac, which might take me a bit.

We get the ProductVersion from /System/Library/CoreServices/SystemVersion.plist, check if it is >= 13 and if so, include STIX Two Math. It might be the case that macOS 26 renamed STIX Two Math to STIX Two Math Regular - which wouldn't really surprise me, as OSes have not considered the fingerprinting concerns when they've renamed fonts to whatever the flavor of the week name is.

I will investigate, if you wish to look in parallel, you could look at SystemVersion.plist and confirm the numbers there, and see if you have STIX Two Math, STIX Two Math Regular, or both on your system.

Attached image STIX font check

This is the content of my SystemVersion.plist file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>BuildID</key>
	<string>27EE83EE-B45D-11F0-85EC-A3C9291BEE3A</string>
	<key>ProductBuildVersion</key>
	<string>25B78</string>
	<key>ProductCopyright</key>
	<string>1983-2025 Apple Inc.</string>
	<key>ProductName</key>
	<string>macOS</string>
	<key>ProductUserVisibleVersion</key>
	<string>26.1</string>
	<key>ProductVersion</key>
	<string>26.1</string>
	<key>iOSSupportVersion</key>
	<string>26.1</string>
</dict>
</plist>

I attached a screenshot of the font check because I don't know if the STIXTwoMath.otf or the STIXTwoMath-Regular is the relevant name for Firefox.

QA Whiteboard: [qa-triage-done-c147/b146][qa-investig-needed-c147/b146]
Summary: Fingerprinting protection breaks some fonts on Facebook, X (and probably other websites) → Fingerprinting protection breaks some fonts on Facebook, X, YouTube (and probably other websites)
Summary: Fingerprinting protection breaks some fonts on Facebook, X, YouTube (and probably other websites) → Fingerprinting protection breaks some fonts on Instagram, Facebook, X, YouTube (and probably other websites)

status-firefox146: affected → wontfix

I see more and more affected websites. When I reported the issue, I only mentioned Facebook and X. In the meantime, I had already noticed the same problem several times on Instagram and YouTube. Since we are talking about very popular websites here, I think this should be fixed in Firefox 146, at least in the planned patch update, if there is not enough time for the final version. What do you think?

Flags: needinfo?(dmeehan)

We don't have a patch yet so it's too late for Fx146
Though I will set Fx146 to fix-optional. We can consider a patch in a dot release if we get a fix that's low risk.

:timhuang, could this be triaged for a priority?

:tjr any update from the initial investigation?

Flags: needinfo?(dmeehan) → needinfo?(tihuang)
Severity: -- → S3
Flags: needinfo?(tihuang)
Priority: -- → P3
Assignee: nobody → tom
Status: NEW → ASSIGNED

Sorry for the slow response - so let's take a shot at allowlisting Two Math Regular and see if that resolves things - I don't have n up to date mac myself, so would you be able to test this?

Eventually - after the tree opens and things catch up, it might be 12 hours or so - https://treeherder.mozilla.org/jobs?repo=try&landoCommitID=166855 will bring you to a page that lists platforms like macOS opt and macOS AArch64 with letters next to them like B. I'm not sure which platform you're on (AArch64 or not - perhaps you do) but after clicking on the B (for 'Build') a lower pane will populate. In that pane, in the black top bar will be a tab Artifacts and Debugging Tools and after clicking that a list will populate. You want to download target.dmg which will be a test build. Compare a known broken site between the test build and your local install and lets see if this resolves the issue.

Assignee: tom → nobody
Status: ASSIGNED → NEW
Flags: needinfo?(tom) → needinfo?(soeren.hentzschel)
Assignee: nobody → tom
Assignee: nobody → tom
Status: NEW → ASSIGNED

The test build works for me. Thanks.

Flags: needinfo?(soeren.hentzschel)
Attachment #9531539 - Flags: approval-mozilla-beta?

firefox-beta Uplift Approval Request

  • User impact if declined: WebCompat improvement for latest MacBooks.

Would be great to uplift it into Beta so it doesn't have to wait a whole release cycle, and if we do a dot release for Release I'll nominate it as a ride-along.

  • Code covered by automated testing: no
  • Fix verified in Nightly: yes
  • Needs manual QE test: no
  • Steps to reproduce for manual QE testing: It would be nice for Manual Testing, but they would need a brand-new Mac. If they do, they should try to reproduce the problem reported in the bug - if they can, then they could verify the fix.
  • Risk associated with taking this patch: low
  • Explanation of risk level: Adding a font to a hardcoded list
  • String changes made/needed: No
  • Is Android affected?: no

firefox-release Uplift Approval Request

  • User impact if declined: WebCompat improvement for latest MacBooks.

Would be great to uplift it into Beta so it doesn't have to wait a whole release cycle, and if we do a dot release for Release I'll nominate it as a ride-along.

  • Code covered by automated testing: no
  • Fix verified in Nightly: yes
  • Needs manual QE test: no
  • Steps to reproduce for manual QE testing: It would be nice for Manual Testing, but they would need a brand-new Mac. If they do, they should try to reproduce the problem reported in the bug - if they can, then they could verify the fix.
  • Risk associated with taking this patch: low
  • Explanation of risk level: Adding a font to a hardcoded list
  • String changes made/needed: No
  • Is Android affected?: no
Attachment #9531540 - Flags: approval-mozilla-release?

It would be nice for Manual Testing, but they would need a brand-new Mac.

You just need to have the latest version of macOS installed. I tested it myself with an M1 MacBook from 2021. :)

Ahha, thank you - I forgot, I couldn't test because my mac was too old to update.

Status: ASSIGNED → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 148 Branch
Attachment #9531539 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

FYI

My test mac is currently Tahoe (26.0.1) and it has journeyed thru at least 4 OS releases (fairly sure I started with Ventura). After each update I have downloaded all available fonts including supplemental and tested font names using https://arkenfox.github.io/TZP/tests/fontdebug.html

On my macOS Tahoe stix two math works (as it always has) and stix two math regular does not (and never has) - in font-family. Sometimes with fonts you need a regular etc part for fontface, but not with stix two math for me - both work in fontface. Updated just now to 26.1 and no change)

Font Book for me shows with Stix Two Math (with spaces, opentype postscript) , so I wonder what it is that specifically makes Sören's version different at StixTwoMath-Regular (no spaces) - could be a bit of a footgun. Was it downloaded from a third party? I have NI.

PS: @tjr can I please get added to FPP issues when/if you guys remember - thanks

We probably want to get this onto ESR140 also.

Flags: needinfo?(tom)
Attachment #9532099 - Flags: approval-mozilla-esr140?
Attachment #9532099 - Flags: approval-mozilla-esr140? → approval-mozilla-esr140+

This is very strange: While the test build worked for me, I still saw the issue with the latest nightly build. That reminds me that I was originally unable to reproduce the problem with mozregression, neither with a new profile nor with my existing profile. This could indicate that there is something wrong with my Firefox profile. However, I experienced this issue on two different MacBooks.

I tried a few more things, but nothing solved the problem. Then I started Firefox in troubleshoot mode, and the problem disappeared. I exited the troubleshoot mode, and the problem remained gone. Does that make sense? Can temporarily running Firefox in troubleshoot mode fix a problem that I had every day for many weeks and that was reproducible depending on the strict tracking protection / fingerprinting protection option? 🤔

Yes - Font Restrictions are only applied when you have ETP Strict Enabled (then it applies in all windows). By default, it will also apply in ETP Standard but only to PBM windows.

Flags: needinfo?(tom)

I am aware that font restrictions are only enabled in ETP Strict. But strangely, the problem still existed in the latest nightly build with ETP Strict, even with the supposed fix. And temporarily starting in troubleshoot mode ultimately solved the problem permanently. That's what confuses me.

Hrm. My understanding of Troubleshoot mode is that it is temporary unless you explicitly choose to Refresh Firefox - so I agree that doesn't make much sense. I don't see any changes specific to mac font loading code nor many changes to the font code in general.

Attachment #9531540 - Flags: approval-mozilla-release? → approval-mozilla-release+

Unfortunately, I don't think that was the right fix. As I said, the nightly build with the supposed solution did not fix the problem for me. A few days ago, I was able to test it again on my other computer, and the problem wasn't fixed there either, but it disappeared after restarting in troubleshoot mode and then exiting the troubleshoot mode. Now I had the problem again on my main device. And again, the problem was solved by starting once in troubleshoot mode and then exiting it again.

I also don't believe this is the correct fix (as in how to handle it) either - see comment18 - there is no way apple are going to change font names like this and break the web, especially something as fundamental as stix two math (not saying platforms don't do stupid things somethings).

If the name eventually resolves the issue (perhaps startup doesn't detect it as the new name so it's never available but some quirk with troubleshooting+restart does), something akin to the windows RFP FontSubstitutes (basically aliases) would be more appropriate, so all mac users report the same

Haik, is there anything in Troubleshoot Mode (I think it's safemode in the code?) that might change Mac sandbox settings or font loading? Or reset some sort of Application Permission?

Or, failing all of that, are you able to reproduce this on an up to date Mac (I don't have one..)

Flags: needinfo?(haftandilian)

(In reply to Tom Ritter [:tjr] (2 days until extended leave) from comment #29)

Haik, is there anything in Troubleshoot Mode (I think it's safemode in the code?) that might change Mac sandbox settings or font loading? Or reset some sort of Application Permission?

We don't have any sandboxing rules that change in troubleshooting mode and I don't know of any permissions we reset. But, Jonathan might know of any impacts to font loading in troubleshooting mode.

Or, failing all of that, are you able to reproduce this on an up to date Mac (I don't have one..)

I'll take a look.

Flags: needinfo?(haftandilian) → needinfo?(jfkthame)

FYI, for debugging, it might be useful to have the output from system_profiler SPFontsDataType. It will dump the paths to all fonts registered on the system (and might include private information in the form of directory names.)

I'm on 26.2 (25C56) and when opening https://www.facebook.com/stunde0/posts/pfbid02arHDEvV3EsUyvrpeTqRvxNEDqfBGnTJ4ABSFsfBZdFYcb7NBNAMuPJpkUpBR5Vykl in Private Browsing mode, I do see the problem.

A new insight: The solution with troubleshoot mode is not permanent. I currently have to repeat this every few days because the problem keeps reappearing. But I haven't figured out why it keeps coming back. Simply closing and restarting Firefox is not enough to see the problem again. It just comes back at some point and can then be solved again for the time being using troubleshoot mode.

I have continued to monitor the problem: As I already wrote, the problem can be temporarily resolved by starting in troubleshoot mode. As a result, I can restart Firefox as often as I want, and the problem remains resolved. But after every update of Firefox Nightly, the problem reappears.

I'm on 26.2 (25C56) and when opening https://www.facebook.com/stunde0/posts/pfbid02arHDEvV3EsUyvrpeTqRvxNEDqfBGnTJ4ABSFsfBZdFYcb7NBNAMuPJpkUpBR5Vykl in Private Browsing mode, I do see the problem.

Do you have any new insights? Should I perhaps open a new ticket, because this one has already been closed and a patch has been released that is linked to this ticket?

Flags: needinfo?(haftandilian)

Tim, is there someone that could follow up on this with Tom being out?

Flags: needinfo?(haftandilian) → needinfo?(tihuang)

(In reply to Sören Hentzschel from comment #35)

I'm on 26.2 (25C56) and when opening https://www.facebook.com/stunde0/posts/pfbid02arHDEvV3EsUyvrpeTqRvxNEDqfBGnTJ4ABSFsfBZdFYcb7NBNAMuPJpkUpBR5Vykl in Private Browsing mode, I do see the problem.

Do you have any new insights? Should I perhaps open a new ticket, because this one has already been closed and a patch has been released that is linked to this ticket?

Soren, yes, filling a new ticket about the behavior you see with this fix would be helpful.

@Haik, are you able to reproduce this and file a new issue?

Flags: needinfo?(haftandilian)

I personally cannot reproduce the same issue. I also support opening a new bug and providing detailed behavior and STP so we can start following it.

Flags: needinfo?(tihuang)
See Also: → 2014255

(In reply to Liz Henry (:lizzard) from comment #38)

@Haik, are you able to reproduce this and file a new issue?

I'm not able to reproduce the problem anymore on https://www.facebook.com/stunde0/posts/pfbid02arHDEvV3EsUyvrpeTqRvxNEDqfBGnTJ4ABSFsfBZdFYcb7NBNAMuPJpkUpBR5Vykl

For the record, Liz filed a new bug for this: bug 2014255.

Flags: needinfo?(haftandilian)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: