Description of problem: ❯ ps -AT o pid,tid,exe:1000,comm:1000,command:1000 |grep -i wine 37835 37835 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader steam.exe c:\windows\system32\steam.exe /home/mikhail/.local/share/Steam/legacycompat/iscriptevaluator.exe legacycompat\evaluatorscript_1259420.vdf 37837 37837 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wineserver wineserver /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wineserver 37841 37841 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader services.exe C:\windows\system32\services.exe 37841 37842 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader wine_rpcrt4_ser C:\windows\system32\services.exe 37841 37845 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader wine_rpcrt4_io C:\windows\system32\services.exe 37841 37849 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader wine_rpcrt4_io C:\windows\system32\services.exe 37841 37855 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader wine_rpcrt4_io C:\windows\system32\services.exe 37841 37858 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader wine_rpcrt4_io C:\windows\system32\services.exe 37841 37868 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader wine_rpcrt4_io C:\windows\system32\services.exe 37841 37874 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader wine_rpcrt4_io C:\windows\system32\services.exe 37841 37879 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader services.exe C:\windows\system32\services.exe 37841 37892 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader wine_rpcrt4_io C:\windows\system32\services.exe 37844 37844 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader winedevice.exe C:\windows\system32\winedevice.exe 37844 37847 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader winedevice.exe C:\windows\system32\winedevice.exe 37844 37848 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader wine_sechost_se C:\windows\system32\winedevice.exe 37844 37850 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader winedevice.exe C:\windows\system32\winedevice.exe 37844 37851 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader winedevice.exe C:\windows\system32\winedevice.exe 37844 37852 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader winedevice.exe C:\windows\system32\winedevice.exe 37844 37877 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader winedevice.exe C:\windows\system32\winedevice.exe 37844 37878 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader winedevice.exe C:\windows\system32\winedevice.exe 37854 37854 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader winedevice.exe C:\windows\system32\winedevice.exe 37854 37856 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader winedevice.exe C:\windows\system32\winedevice.exe 37854 37857 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader wine_sechost_se C:\windows\system32\winedevice.exe 37854 37859 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader winedevice.exe C:\windows\system32\winedevice.exe 37854 37860 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader libusb_event C:\windows\system32\winedevice.exe 37854 37861 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader winedevice.exe C:\windows\system32\winedevice.exe 37854 37862 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader winedevice.exe C:\windows\system32\winedevice.exe 37854 37863 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader winedevice.exe C:\windows\system32\winedevice.exe 37854 37865 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader winedevice.exe C:\windows\system32\winedevice.exe 37867 37867 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader plugplay.exe C:\windows\system32\plugplay.exe 37867 37869 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader plugplay.exe C:\windows\system32\plugplay.exe 37867 37870 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader wine_sechost_se C:\windows\system32\plugplay.exe 37867 37871 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader wine_rpcrt4_ser C:\windows\system32\plugplay.exe 37873 37873 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader svchost.exe C:\windows\system32\svchost.exe -k LocalServiceNetworkRestricted 37873 37875 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader svchost.exe C:\windows\system32\svchost.exe -k LocalServiceNetworkRestricted 37873 37876 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader wine_sechost_se C:\windows\system32\svchost.exe -k LocalServiceNetworkRestricted 37881 37881 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader conhost.exe C:\windows\system32\conhost.exe --unix --width 238 --height 53 --server 0x10 37883 37883 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader explorer.exe C:\windows\system32\explorer.exe /desktop 37883 37887 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader explorer.exe C:\windows\system32\explorer.exe /desktop 37883 37888 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader wine_rpcrt4_ser C:\windows\system32\explorer.exe /desktop 37891 37891 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader rpcss.exe C:\windows\system32\rpcss.exe 37891 37894 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader rpcss.exe C:\windows\system32\rpcss.exe 37891 37895 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader wine_sechost_se C:\windows\system32\rpcss.exe 37891 37896 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader wine_rpcrt4_ser C:\windows\system32\rpcss.exe 37891 37897 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader wine_rpcrt4_ser C:\windows\system32\rpcss.exe 37891 37898 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader wine_rpcrt4_io C:\windows\system32\rpcss.exe 37901 37901 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader tabtip.exe C:\windows\system32\tabtip.exe 37901 37905 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader wine_rpcrt4_ser C:\windows\system32\tabtip.exe 37901 37906 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader tabtip.exe C:\windows\system32\tabtip.exe 37901 37910 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader tabtip.exe C:\windows\system32\tabtip.exe 37908 37908 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine-preloader iscriptevaluato Z:\home\mikhail\.local\share\Steam\legacycompat\iscriptevaluator.exe legacycompat\evaluatorscript_1259420.vdf 37913 37913 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine-preloader SteamService.ex legacycompat\SteamService.exe /installscript Z:\home\mikhail\.local\share\Steam\steamapps\common\Steamworks Shared\runasadmin.vdf 228980 37915 37915 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader conhost.exe C:\windows\system32\conhost.exe --server 0x34 38115 38115 /home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine-preloader DXSETUP.exe Z:\home\mikhail\.local\share\Steam\steamapps\common\Steamworks Shared\_CommonRedist\DirectX\Jun2010\DXSETUP.exe /silent 38118 38118 /usr/bin/grep grep grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox -i wine SELinux is preventing wine-preloader from using the 'execheap' accesses on a process. ***** Plugin allow_execheap (53.1 confidence) suggests ******************** If you do not think wine-preloader should need to map heap memory that is both writable and executable. Then you need to report a bug. This is a potentially dangerous access. Do contact your security administrator and report this issue. ***** Plugin catchall_boolean (42.6 confidence) suggests ****************** If you want to allow selinuxuser to execheap Then you must tell SELinux about this by enabling the 'selinuxuser_execheap' boolean. Do setsebool -P selinuxuser_execheap 1 ***** Plugin catchall (5.76 confidence) suggests ************************** If you believe that wine-preloader should be allowed execheap access on processes labeled unconfined_t by default. Then you should report this as a bug. You can generate a local policy module to allow this access. Do allow this access for now by executing: # ausearch -c 'wine-preloader' --raw | audit2allow -M my-winepreloader # semodule -X 300 -i my-winepreloader.pp Additional Information: Source Context unconfined_u:unconfined_r:unconfined_t:s0- s0:c0.c1023 Target Context unconfined_u:unconfined_r:unconfined_t:s0- s0:c0.c1023 Target Objects Unknown [ process ] Source wine-preloader Source Path wine-preloader Port <Unknown> Host (removed) Source RPM Packages Target RPM Packages SELinux Policy RPM selinux-policy-targeted-40.4-1.fc40.noarch Local Policy RPM selinux-policy-targeted-40.4-1.fc40.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Permissive Host Name (removed) Platform Linux (removed) 6.6.0-61.fc40.x86_64+debug #1 SMP PREEMPT_DYNAMIC Mon Oct 30 11:40:06 UTC 2023 x86_64 Alert Count 108 First Seen 2023-10-16 03:08:29 +05 Last Seen 2023-10-31 23:36:24 +05 Local ID 12ea481c-80a4-4393-af0d-e9f7d9865461 Raw Audit Messages type=AVC msg=audit(1698777384.891:397): avc: denied { execheap } for pid=37924 comm="wine-preloader" scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=process permissive=1 Hash: wine-preloader,unconfined_t,unconfined_t,process,execheap Version-Release number of selected component: selinux-policy-targeted-40.4-1.fc40.noarch Additional info: reporter: libreport-2.17.11 reason: SELinux is preventing wine-preloader from using the 'execheap' accesses on a process. package: selinux-policy-targeted-40.4-1.fc40.noarch component: selinux-policy hashmarkername: setroubleshoot type: libreport kernel: 6.6.0-61.fc40.x86_64+debug component: selinux-policy
Created attachment 1996408 [details] File: description
Created attachment 1996409 [details] File: os_info
The Linux implementation of mprotect (unlike POSIX) allows changing the access protection of memory on the heap, e. g. allocated using malloc. This AVC denial indicates that heap memory was supposed to be made executable. While the permission can be granted turning the selinuxuser_execheap boolean on as suggested by setroubleshoot, it should not be done without a thorough code review as in most cases it indicates a bug in the code. If anonymous executable memory is needed, another method should be considered, e. g. allocating memory using mmap. Please refer to the boolean description: # semanage boolean -l|grep execheap selinuxuser_execheap (off , off) Allow unconfined executables to make their heap memory executable. Doing this is a really bad idea. Probably indicates a badly coded executable, but could indicate an attack. This executable should be reported in bugzilla Switching the component to wine for further assessment.
*** Bug 2252261 has been marked as a duplicate of this bug. ***
*** Bug 2236622 has been marked as a duplicate of this bug. ***
Possible duplicates: bug 2247300, bug 2247309.
*** Bug 2252649 has been marked as a duplicate of this bug. ***
*** Bug 2247300 has been marked as a duplicate of this bug. ***
*** Bug 2247309 has been marked as a duplicate of this bug. ***
Alright... On F39, launching a game via Proton 8.0-4 (Steam) or merely running winecfg (Wine 8.19) is enough to produce an execheap alert roughly every other time. At this point I don't recall which was the last version of Wine I ran on F38, but Proton 8.0-4 used to work just fine.
This probably has the same cause as bug 2252391 (see https://bugzilla.redhat.com/show_bug.cgi?id=2252391#c16).
*** Bug 2254143 has been marked as a duplicate of this bug. ***
*** Bug 2254150 has been marked as a duplicate of this bug. ***
*** Bug 2254170 has been marked as a duplicate of this bug. ***
Bug 2252391 should now be fixed in rawhide since kernel-6.7.0-0.rc5.20231217git3b8a9b2e6809.47.fc40 - can someone test with the latest rawhide kernel if this bug was also fixed?
It seem to be fixed already in kernel-6.6.7-200.fc39.x86_64. Do you still like us to check the rawhide kernel anyway?
It still not fixed in Rawhide root@primary-ws ~# semanage boolean -l|grep execheap selinuxuser_execheap (off , off) Allow selinuxuser to execheap root@primary-ws ~# uname -r 6.7.0-0.rc6.20231220git55cb5f43689d.50.fc40.x86_64+debug root@primary-ws ~ [1]# ausearch -i -m avc,user_avc,selinux_err,user_selinux_err -ts yesterday ---- type=PROCTITLE msg=audit(12/21/2023 02:44:52.178:351) : proctitle=/home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine-preloader /home/mikhail/.local/share/Stea type=SYSCALL msg=audit(12/21/2023 02:44:52.178:351) : arch=i386 syscall=mprotect success=yes exit=0 a0=0x7ffff000 a1=0x1000 a2=PROT_READ|PROT_EXEC a3=0x2 items=0 ppid=30206 pid=30305 auid=mikhail uid=mikhail gid=mikhail euid=mikhail suid=mikhail fsuid=mikhail egid=mikhail sgid=mikhail fsgid=mikhail tty=(none) ses=3 comm=wine-preloader exe=/home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine-preloader subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null) type=AVC msg=audit(12/21/2023 02:44:52.178:351) : avc: denied { execheap } for pid=30305 comm=wine-preloader scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=process permissive=1 ---- type=PROCTITLE msg=audit(12/21/2023 10:00:40.869:469) : proctitle=/home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine-preloader /home/mikhail/.local/share/Stea type=SYSCALL msg=audit(12/21/2023 10:00:40.869:469) : arch=i386 syscall=mprotect success=yes exit=0 a0=0x7ffff000 a1=0x1000 a2=PROT_READ|PROT_EXEC a3=0x2 items=0 ppid=51200 pid=51303 auid=mikhail uid=mikhail gid=mikhail euid=mikhail suid=mikhail fsuid=mikhail egid=mikhail sgid=mikhail fsgid=mikhail tty=(none) ses=3 comm=wine-preloader exe=/home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine-preloader subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null) type=AVC msg=audit(12/21/2023 10:00:40.869:469) : avc: denied { execheap } for pid=51303 comm=wine-preloader scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=process permissive=1 ---- type=PROCTITLE msg=audit(12/21/2023 13:02:56.019:543) : proctitle=/home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine-preloader /home/mikhail/.local/share/Stea type=SYSCALL msg=audit(12/21/2023 13:02:56.019:543) : arch=i386 syscall=mprotect success=yes exit=0 a0=0x7ffff000 a1=0x1000 a2=PROT_READ|PROT_EXEC a3=0x2 items=0 ppid=68768 pid=68870 auid=mikhail uid=mikhail gid=mikhail euid=mikhail suid=mikhail fsuid=mikhail egid=mikhail sgid=mikhail fsgid=mikhail tty=(none) ses=3 comm=wine-preloader exe=/home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine-preloader subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null) type=AVC msg=audit(12/21/2023 13:02:56.019:543) : avc: denied { execheap } for pid=68870 comm=wine-preloader scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=process permissive=1 ---- type=PROCTITLE msg=audit(12/21/2023 18:11:50.627:709) : proctitle=/home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine-preloader /home/mikhail/.local/share/Stea type=SYSCALL msg=audit(12/21/2023 18:11:50.627:709) : arch=i386 syscall=mprotect success=yes exit=0 a0=0x7ffff000 a1=0x1000 a2=PROT_READ|PROT_EXEC a3=0x2 items=0 ppid=103851 pid=103957 auid=mikhail uid=mikhail gid=mikhail euid=mikhail suid=mikhail fsuid=mikhail egid=mikhail sgid=mikhail fsgid=mikhail tty=(none) ses=3 comm=wine-preloader exe=/home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental/files/bin/wine-preloader subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null) type=AVC msg=audit(12/21/2023 18:11:50.627:709) : avc: denied { execheap } for pid=103957 comm=wine-preloader scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=process permissive=1
Yeah, it's still not fixed in Rawhide and I was wrong about kernel-6.6.7-200.fc39.x86_64. It just took time to happen: ================================= SELinux impedisce a wine-preloader un accesso execheap su un processo. ⏎ ⏎ ***** Plugin allow_execheap(53.1 confidenza) suggerisce******************** Se non pensi wine-preloader dovrebbe avere bisogno di mappare la memoria heap che è sia scrivibile che eseguibile. Quindi è necessario riportare un bug. Questo è un accesso potenzialmente pericoloso. Fai contattare il proprio amministratore di sicurezza e riportare il problema. ⏎ ⏎ ***** Plugin catchall_boolean(42.6 confidenza) suggerisce****************** Se lo desidera allow selinuxuser to execheap Quindi è necessario informare SELinux abilitando il booleano 'selinuxuser_execheap' . Fai setsebool -P selinuxuser_execheap 1 ⏎ ⏎ ***** Plugin catchall(5.76 confidenza) suggerisce************************** Se ci credi wine-preloader dovrebbe essere consentito execheap accesso ai processi etichettati unconfined_t per impostazione predefinita. Quindi si dovrebbe riportare il problema come bug. E' possibile generare un modulo di politica locale per consentire questo accesso. Fai consentire questo accesso per ora eseguendo: # ausearch -c 'wine-preloader' --raw | audit2allow -M my-$MODULE_NOME # semodule -X 300 -i miei-winepreloader.pp Informazioni addizionali: Contesto della sorgente unconfined_u:unconfined_r:unconfined_t:s0- s0:c0.c1023 Contesto target unconfined_u:unconfined_r:unconfined_t:s0- s0:c0.c1023 Oggetti target Sconosciuto [ process ] Sorgente wine-preloader Percorso della sorgente wine-preloader Porta <Sconosciuto> Host dave.idp.it Sorgente Pacchetti RPM Pacchetti RPM target SELinux Policy RPM selinux-policy-targeted-39.3-1.fc39.noarch Local Policy RPM selinux-policy-targeted-39.3-1.fc39.noarch Selinux abilitato True Tipo di politica targeted Modalità Enforcing Permissive Host Name dave.idp.it Piattaforma Linux dave.idp.it 6.6.7-200.fc39.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Dec 13 21:43:37 UTC 2023 x86_64 Conteggio avvisi 1 Primo visto 2023-12-22 03:28:33 CET Ultimo visto 2023-12-22 03:28:33 CET ID locale 79e3b09b-193c-4003-b4d4-fbf103bbd94c Messaggi Raw Audit type=AVC msg=audit(1703212113.401:454): avc: denied { execheap } for pid=332198 comm="wine-preloader" scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=process permissive=1 Hash: wine-preloader,unconfined_t,unconfined_t,process,execheap
*** Bug 2255618 has been marked as a duplicate of this bug. ***
*** Bug 2256329 has been marked as a duplicate of this bug. ***
*** Bug 2257723 has been marked as a duplicate of this bug. ***
Not fixed in kernel 6.6.13, as of February 1, 2024. Linux soterius.local.iycc.net 6.6.13-200.fc39.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Jan 20 18:03:28 UTC 2024 x86_64 GNU/Linux wine-9.0 (Staging) selinux-policy-targeted-39.4-1.fc39.noarch selinux-policy-39.4-1.fc39.noarch Additional Information: Source Context unconfined_u:unconfined_r:unconfined_t:s0- s0:c0.c1023 Target Context unconfined_u:unconfined_r:unconfined_t:s0- s0:c0.c1023 Target Objects Unknown [ process ] Source wine-preloader Source Path wine-preloader Port <Unknown> Host soterius.local.iycc.net Source RPM Packages Target RPM Packages SELinux Policy RPM selinux-policy-targeted-39.4-1.fc39.noarch Local Policy RPM selinux-policy-targeted-39.4-1.fc39.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name soterius.local.iycc.net Platform Linux soterius.local.iycc.net 6.6.13-200.fc39.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Jan 20 18:03:28 UTC 2024 x86_64 Alert Count 7 First Seen 2024-02-01 12:26:33 CST Last Seen 2024-02-01 12:26:39 CST Local ID ff176081-15bc-4c22-9f6c-04ded9e5fb3d Raw Audit Messages type=AVC msg=audit(1706811999.410:400): avc: denied { execheap } for pid=14513 comm="wine-preloader" scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=process permissive=0 Hash: wine-preloader,unconfined_t,unconfined_t,process,execheap
This bug appears to have been reported against 'rawhide' during the Fedora Linux 40 development cycle. Changing version to 40.
*** Bug 2265299 has been marked as a duplicate of this bug. ***
Bug 2252391 is supposed to be fixed by kernel-6.7.3-200.fc39, but I keep getting execheap alerts with kernel-6.7.9-200.fc39. There might be something else going on.
*** Bug 2269770 has been marked as a duplicate of this bug. ***
*** Bug 2269949 has been marked as a duplicate of this bug. ***
*** Bug 2278624 has been marked as a duplicate of this bug. ***
A Valve Proton upstream issue seems to be here: https://github.com/ValveSoftware/Proton/issues/7285
*** Bug 2277614 has been marked as a duplicate of this bug. ***
*** Bug 2279615 has been marked as a duplicate of this bug. ***
(In reply to Zdenek Pytela from comment #3) > The Linux implementation of mprotect (unlike POSIX) allows changing the > access protection of memory on the heap, e. g. allocated using malloc. This > AVC denial indicates that heap memory was supposed to be made executable. > While the permission can be granted turning the selinuxuser_execheap boolean > on as suggested by setroubleshoot, it should not be done without a thorough > code review as in most cases it indicates a bug in the code. If anonymous > executable memory is needed, another method should be considered, e. g. > allocating memory using mmap. > > Please refer to the boolean description: > > # semanage boolean -l|grep execheap > selinuxuser_execheap (off , off) Allow unconfined executables > to make their heap memory executable. Doing this is a really bad idea. > Probably indicates a badly coded executable, but could indicate an attack. > This executable should be reported in bugzilla > > Switching the component to wine for further assessment. I submitted this bug to WineHQ's Bugzilla: https://bugs.winehq.org/show_bug.cgi?id=56650 The maintainer of wine says: > However, we may need to allocate memory (allocated directly from mmap and not through malloc) which is both writable and executable, because Windows programs require it. This seems to mean that both executable and writable memory is necessary for wine-preloader. Would you consider setting an exception for the wine-preloader in SELinux's rules?
It's very weird, but I've started to get this exact selinux alerts when launching any electron-based application
Since we're playing telephone... > The question is really whether this is about the libc "heap" (which is not > something that I thought the kernel had any concept of?), or if it's a blanket W^X > imposition on the whole process. If the former, that's surprising and deserves > investigation, because if I'm not mistaken we should never do that. If the latter, > it's an immediate WONTFIX. > > Finding any trace of documentation on execheap, or really SELinux in general, and > which of these two is the case, proves very difficult. https://bugs.winehq.org/show_bug.cgi?id=56650#c6 Anyone?