MFA 2.3.x: .NET Framewrok "System.OutOfMemoryException" error and OS Crash During Authentication Due to Corrupt User Tile Image
5 months ago
Article Number
000073688
Applies To

RSA Product Set: SecurID
RSA Product/Service Type: RSA MFA Agent for Microsoft Windows
Version(s): All supported versions 

Issue

After installing MFA 2.3.x, when a user attempts to authenticate via the credential provider or MFA test utility (e.g., at Windows logon), the process fails with an unhandled exception error dialog.

The error message when testing from MFA test utility :"ERROR: An unhandled exception has occurred in your application... Exception Text: System.OutOfMemoryException: Out of memory. at System.Drawing.Image.FromFile(String filename, Boolean useEmbeddedColorManagement) at RSA.Authentication.Cas.UI.Views.AuthMethodUserControl.SetLogonPicture(String pictureFilePath)..."


Clicking any button in the error dialog (Continue or Quit) causes the operating system to become unresponsive, requiring a hard reboot.

From the MFA logs, we see the following error:

[E] [RSA.Authentication.Cas.UI.Views.MfaDialogForm.MfaDialogForm_Load] Exception loading Custom Logo. Check the path to the image file.Parameter is not valid.

Cause

The issue is caused by a corrupt or unreadable user account picture (tile image) file located at:
C:\Users\Public\AccountPictures\<User_SID>

The MFA credential provider attempts to load this image to display a familiar user interface during authentication. If the image file is corrupted, oversized, or in an invalid format, the System.Drawing.Image.FromFile method fails to process it, throwing an "Out of Memory" exception. This exception is unhandled, crashing the credential provider process and destabilizing the Winlogon process, which leads to the OS crash.

Resolution

You can apply one of the following solutions:

Option 1: Remove the Image and Apply Registry Fix

  1. Boot the machine into Safe Mode or use an alternate administrative account.

  2. Delete all user.* and guest.* files from this directory:
    %PROGRAMDATA%\Microsoft\User Account Pictures\

  3. Open the Registry Editor (regedit).

  4. Navigate to this key:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer

  5. Create or modify the UseDefaultTile DWORD value and set its data to 0.

  6. Reboot the machine.

Option 2: Replace the Corrupt User Image

  1. Boot the machine into Safe Mode or use an alternate administrative account.

  2. Navigate to the affected user's directory:
    C:\Users\Public\AccountPictures\<SID>\

  3. Replace the existing corrupt image file with a new, valid, and small-sized image file (e.g., a PNG or JPG under 100KB). Ensure the new file has the same name as the original.

  4. Reboot the machine.