Closed Bug 1505438 Opened 6 years ago Closed 5 years ago

The font of some buttons is improperly displayed when sandbox early initiation preference is true

Categories

(Core :: Security: Process Sandboxing, defect, P1)

Desktop
macOS
defect

Tracking

()

RESOLVED WORKSFORME
Tracking Status
firefox63 --- unaffected
firefox64 --- unaffected
firefox65 --- affected

People

(Reporter: danibodea, Assigned: haik)

References

Details

Attachments

(3 files)

[Note]:
- The font of some buttons is improperly displayed when sandbox early initiation preference is true on Mac Mini 2011.

[Affected versions]:
- Nightly v65.0a1

[Affected platforms]:
- Mac OS X 10.10.5, 10.11.5, 10.12.5 (only on MiniMAC)
[Unafected platforms]:
- MacBook Pro (Retina, 15-inch, Late 2013), iMac (late 2013), MacBook Pro (13-inch, 2017)

[Steps to reproduce]:
1. Go to about:config and set "security.sandbox.content.mac.earlyinit" preference as "true";
2. Restart browser.
3. Log into Facebook.
4. Open the following facebook app (game):
https://apps.facebook.com/108854979142742
5. Reach the main screen.

[Expected result]:
- The button from the bottom-left corner of the screen displays the text "FRIENDS" correctly and easily read.

[Actual result]:
- The button from the bottom-left corner of the screen is missing its string/tag. (The font is unreadable.)

[Additional notes]:
- This issue ONLY occurs on Mac mini Mid 2011. 
  Explanation needed: This issue only occurs on this device when the "security.sandbox.content.mac.earlyinit" pref is true, while it doesn't if the pref is false; all this only when running Mac OS X 10.10.5, 10.11.5, 10.12.5, but not when running 10.9.5.
- This issue also occurs on MacBook Pro (Retina, 15-inch, Late 2013), iMac (late 2013), MacBook Pro (13-inch, 2017), BUT it also occurs if the pref is false, so it's not linked to the sandbox feature.
Summary: The font of some buttons is improperly displaced when sandbox early initiation preference is true → The font of some buttons is improperly displayed when sandbox early initiation preference is true
Assignee: nobody → haftandilian
Priority: -- → P1
Bodea, would it be possible for you to check if this is still reproducible? I'm wondering if this was some type of general intermittent issue with the affected machine? In addition, the fix for bug 1506776 is in Nightly and might have impacted this.
Flags: needinfo?(daniel.bodea)
I have reconfirmed this issue on Mac Mini with OS X 10.11.5. It still occurs just like before, only when the sandbox early initiation is true.
Flags: needinfo?(daniel.bodea)
Thanks, Bodea. It looks like this isn't related to Flash. For me, the link you sent doesn't use Flash and the screenshot you posted shows Flash isn't being used on the page because the little plugin icon is not displayed in the URL bar.

I'm trying to reproduce the problem on a local machine. So far I've tested on a Late 2008 MacBook (Unibody) running 10.10 and the fonts are displayed incorrectly both with and without early startup enabled. More debugging needed.
On a MacBook Pro (15-inch, 2018) running 10.14, the problem occurs with/without early startup enabled on build 65. And it occurs on Beta 64 where early startup is not included.
I think this issue is somehow related to the hardware of the Mac mini Mid 2011, considering it only occurs on it.
(In reply to Bodea Daniel [:danibodea] from comment #5)
> I think this issue is somehow related to the hardware of the Mac mini Mid
> 2011, considering it only occurs on it.

I agree.

There are a few more steps we can do for debugging. The first one collects a list all the fonts installed on the system and that might be helpful in case this is related to fonts. To collect the font list, use the Terminal.app (/Applications/Utilities/Terminal) to run the following command which will write a file 1505438-fonts.txt to your desktop on the Mac. Then please email me or post that file to the bug.

  system_profiler SPFontsDataType > ~/Desktop/1505438-fonts.txt

Other than that, we can use the Console.app (/Applications/Utilities/Console) and compare sandbox violations between runs. That requires setting security.sandbox.logging.enabled=true in about:config and restarting. I can provide more detailed instructions, but that might be easier to do with screen sharing on Vidyo.
Flags: needinfo?(daniel.bodea)
The same game is available at https://www.bingoblitz.com/ without requiring a facebook login.
Attached file 1505438-fonts.txt
This is the requested fonts list from the Mac Mini mid 2011 test machine.
Flags: needinfo?(daniel.bodea)
Firstly I need to mention that the game link you posted shows the same problem, but for different texts. It shows the same feature issue (only when the sandbox early initiation pref is true) but on different locations of text around the game.

If you will provide a detailed tutorial on the second part using the console app, I will try to do whatever is needed.
On the other hand, we could set a meet. Please direct message me in slack if needed.
Slack ID: dbodea

Thanks.
Thanks, Bodea!

In the font list, there is one non-standard font that may be causing the font to work when the earlyinit=false. The font "Fine College" is enabled from the Downloads folder. Could you try using the Font Book application (/Applications/Font Book) to unregister that font. Then delete /Users/svuser/Downloads/fine-college/Fine College.ttf from the system using the Finder. (Please keep a backup in case we need to do more testing with the font.)

    Fine College.ttf:
      Kind: TrueType
      Valid: Yes
      Enabled: Yes
      Location: /Users/svuser/Downloads/fine-college/Fine College.ttf
      Typefaces:
        FineCollege:
          Full Name: Fine College
          Family: Fine College
          Style: Regular
          Version: Version 1.00 January 12, 2014, initial release
          Vendor: Galdino Otten
          Unique Name: Fine College:Version 1.00
          Designer: Typeface © Galdino Otten. 2013. All Rights Reserved
          Copyright: Typeface © Galdino Otten. 2013. All Rights Reserved
          Trademark: Typeface © Galdino Otten. 2013. All Rights Reserved
          Description: This font was created using FontCreator 6.5 from High-Logic.com
          Outline: Yes
          Valid: Yes
          Enabled: Yes
          Duplicate: No
          Copy Protected: No
          Embeddable: Yes
Flags: needinfo?(daniel.bodea)
Hello,

I booted the Mac Mini in the OS version that had the Fine College font, I opened the Font Book app to find out that the Fine College font wasn't even imported into the Font Book font manager app. Then I realized it must be in some other font manager app. I found the Font Explorer X app, opened it and found the Fine College font installed and enabled by this app. I, then, disabled the font and deleted it from the font manager app, then made sure it wasn't enabled by any other font managers that might be installed on the Mac.

I even restarted the OS and launched the BINGO Blitz Facebook game, but the original bug reproduced just like before.

Furthermore, I have to mention that the Mac Mini device is a test machine that might have a bunch of non-standard fonts installed on it. I would be great if I could somehow disable all non-standard fonts at once or revert the fonts to the default/original version, since many fonts might have been installed in the meantime. Is there such a way?
Flags: needinfo?(daniel.bodea)
(In reply to Bodea Daniel [:danibodea] from comment #11)
> I even restarted the OS and launched the BINGO Blitz Facebook game, but the
> original bug reproduced just like before.

With the Fine College.ttf font removed, I think the font should fail to display both with/without earlyinit=true and that this is bug 1469063.

> Furthermore, I have to mention that the Mac Mini device is a test machine
> that might have a bunch of non-standard fonts installed on it. I would be
> great if I could somehow disable all non-standard fonts at once or revert
> the fonts to the default/original version, since many fonts might have been
> installed in the meantime. Is there such a way?

There is a command "fontrestore default" that you can run from the Terminal. See the man page for the command by running "man fontrestore" from Terminal. You can try the command without making any changes by using the -n option.

  fontrestore default

If you run the command again from comment 6, I can check the font list after you run fontrestore.
Firstly, I have to say that even after removing the Fine College font, the issue still only reproduced when sandbox early init pref was enabled.

Secondly, the "fontrestore default" command could not be executed because of permission errors. Then I found out that I can do the same thing from the Font Book app by using the "Restore standard fonts..." option from the "File" menu. As a confirmation that it worked, even the terminal command seemed to be working correctly because no permission errors were being displayed this time.

Unfortunately, the issue still reproduced, like before, only when the sandbox early init pref was enabled, even after a reboot.

I, then, ran the command from comment 6 to get the font list that I'll attach after this comment.

Considering all of the above, the issue does not seem to be related to the installation non-standard fonts, unless the default fonts weren't restored to the default state correctly.
Attached file 1505438-fonts.txt
This is the font list requested after the "Restore standard fonts" option from the Font Book app was ran.
Thanks, Bodea. Leaving needinfo for myself to come back to this to debug further.
Flags: needinfo?(haftandilian)

Haven't been able to reproduce this issue on a 10.11 or 10.14 machine. Will give 10.10 a try.

Bodea, if the test machine is still available, and the bug is still reproducible, I could try to debug the problem on that machine. Assuming it's possible to setup a VNC session that I could log into.

Flags: needinfo?(haftandilian) → needinfo?(daniel.bodea)

Not reproducible for me on a 10.10 system. There is something unexplained here, but we need access to the machine to debug further.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WORKSFORME

Hi again.
I have to mention that I have retested this issue and it does not occur anymore on the specific device that was occurring.
I have tested on the following devices:

  1. Mac mini Mid 2011:
    a. 10.10.5 - does not occur anymore, nor when the pref is on, neither when off;
    b. 10.11.5 - does not occur anymore, nor when the pref is on, neither when off;
    c. 10.12.6 - does not occur anymore, nor when the pref is on, neither when off;
  2. MacBook Pro (13-inch, 2017):
    10.14 - does not occur anymore, nor when the pref is on, neither when off.

Considering the last testing session, this issue is correctly marked as RESOLVED WORKSFORME.

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

Attachment

General

Created:
Updated:
Size: