Stack Overflow in Wine Flatpak (WoW64) on AlmaLinux 9 when Running 64-bit Installer

Hello,

I’m attempting to run a 64-bit Windows installer using the Flatpak version of Wine (org.winehq.Wine) on AlmaLinux 9.

Despite granting full file system access via Flatseal (including $HOME and all system files), the installer crashes immediately on launch with a stack overflow error. The terminal shows:

err:virtual:map_image_into_view failed to set 60000020 protection on C:\\windows\\system32\\ntdll.dll
err:virtual:virtual_setup_exception stack overflow

I’ve tested multiple Flatpak versions of Wine (wow64-24.08, etc.), freshly initialized the Wine prefix, and even launched Wine via --command=bash to ensure environment control. The failure persists.

This same installer works under native Wine on non-Flatpak-based systems. It seems the Flatpak sandbox is preventing the memory protections required to load ntdll.dll properly under WoW64.

Questions:

  1. Is there a known workaround to allow Flatpak Wine to run 64-bit installers requiring executable memory mapping for system DLLs?
  2. Is this a known Flatpak sandbox limitation, or can the issue be resolved via overrides or manifest adjustments?

Thank you in advance for your help. In version 8 it runs without any problems.

Best regards,
Juergen

Hi,

This sounds very similar to what some users of OpenSUSE MicroOS reported - that any Flatpake’d Wine version throws these exact 2 errors.

They did try non Flatpak Wine (though via distrobox since MicroOS is an immutable distro) and those ran fine.

I suspect the issue here is not Flatpak sandbox preventing Wine to run properly, but SELinux enforcing mode - since both MicroOS and AlmaLinux have this mode enabled by default.

Before running org.winehq.Wine Flatpak, type “sudo setsebool selinuxuser_execmod 1” and then try running that installer afterwards.
If that fixed the issue, you can then type “sudo setsebool -P selinuxuser_execmod 1” to make it permanent.

(Btw, you don’t need to change org.winehq.Wine permissions, as the Flatpak already has all the proper permissions needed for Wine to function properly).

Thanks for answer. Its fixed with an update so it running fine now. Thanks for investigations!