Description of problem: SELinux is preventing gdb from 'write' accesses on the directory /usr/share/gcc-5.1.1/python/libstdcxx/v6. ***** Plugin catchall_labels (83.8 confidence) suggests ******************* If you want to allow gdb to have write access on the v6 directory Then you need to change the label on /usr/share/gcc-5.1.1/python/libstdcxx/v6 Do # semanage fcontext -a -t FILE_TYPE '/usr/share/gcc-5.1.1/python/libstdcxx/v6' where FILE_TYPE is one of the following: abrt_tmp_t, abrt_upload_watch_tmp_t, abrt_var_cache_t, abrt_var_log_t, abrt_var_run_t, mock_var_lib_t, rpm_var_cache_t, rpm_var_run_t, sosreport_tmp_t, tmp_t, var_log_t, var_run_t, var_spool_t, var_t. Then execute: restorecon -v '/usr/share/gcc-5.1.1/python/libstdcxx/v6' ***** Plugin catchall (17.1 confidence) suggests ************************** If you believe that gdb should be allowed write access on the v6 directory 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: # grep gdb /var/log/audit/audit.log | audit2allow -M mypol # semodule -i mypol.pp Additional Information: Source Context system_u:system_r:abrt_t:s0-s0:c0.c1023 Target Context system_u:object_r:usr_t:s0 Target Objects /usr/share/gcc-5.1.1/python/libstdcxx/v6 [ dir ] Source gdb Source Path gdb Port <Unknown> Host (removed) Source RPM Packages Target RPM Packages libstdc++-5.1.1-1.fc23.x86_64 libstdc++-5.1.1-1.fc23.i686 Policy RPM selinux-policy-3.13.1-127.fc23.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name (removed) Platform Linux (removed) 4.1.0-0.rc3.git2.1.fc23.x86_64 #1 SMP Wed May 13 14:49:26 UTC 2015 x86_64 x86_64 Alert Count 38 First Seen 2015-05-17 12:06:22 MSK Last Seen 2015-05-17 12:44:41 MSK Local ID 406a1842-f453-4980-9b77-e7b2e089d413 Raw Audit Messages type=AVC msg=audit(1431855881.814:1688): avc: denied { write } for pid=647 comm="gdb" name="v6" dev="dm-1" ino=139645 scontext=system_u:system_r:abrt_t:s0-s0:c0.c1023 tcontext=system_u:object_r:usr_t:s0 tclass=dir permissive=0 Hash: gdb,abrt_t,usr_t,dir,write Version-Release number of selected component: selinux-policy-3.13.1-127.fc23.noarch Additional info: reporter: libreport-2.5.1 hashmarkername: setroubleshoot kernel: 4.1.0-0.rc3.git2.1.fc23.x86_64 type: libreport Potential duplicate: bug 665543
Please report: rpm -V libstdc++
(In reply to Jan Kratochvil from comment #1) > Please report: rpm -V libstdc++ It returns nothing. Let me give some info how I got this issue. I've started 0ad which crashed. It provides opening session in gdb itself, so I tried it. > OS error = ? > (C)ontinue, (S)uppress, (B)reak, Launch (D)ebugger, or (E)xit? I tired press `D`. > Attaching to process 5103 > ptrace: Operation not permitted.
"ptrace: Operation not permitted." is really unrelated to this Bug. I have heard new Fedora kernels (F-22+ or Rawhide, not sure) enabled ptrace restriction which can be workarounded/fixed by: echo 0 >/proc/sys/kernel/yama/ptrace_scope This Bug is that occasionally Python wants to rebuild *.pyc and *.pyo files from *.py but if you have intact libstdc++.rpm I do not see a reason why it would do that. What is your exact version - NVRA: rpm -q libstdc++
libstdc++-5.1.1-1.fc23.x86_64
How should I fix this? $ strace -o y -q gdb ./vector -ex start -ex c -ex q mkdir("/lib64/../share/gcc-5.1.1/python/libstdcxx/v6/__pycache__", 0777) = -1 EACCES (Permission denied) So Python is OK with that, I see no errors, everything works. And I see no SELinux messages anywhere either. For example: [root@localhost ~]# ausearch -m avc <no matches> When I ran GDB as root then it created that __pycache__ but again no SELinux errors anywhere. Enforcing gdb-7.9.1-14.fc23.x86_64 python-2.7.9-11.fc23.x86_64 selinux-policy-targeted-3.13.1-127.fc23.noarch kernel-core-4.1.0-0.rc4.git0.1.fc23.x86_64 libstdc++-5.1.1-1.fc23.x86_64 libstdc++-5.1.1-1.fc23.i686
The package libstdc++ has to byte compile /usr/share/gcc-5.1.1/python/libstdcxx/v6/*.py files with Python 3 and take ownership of the .pyc files in /usr/share/gcc-5.1.1/python/libstdcxx/v6/__pycache__ [1]. This bug is a dupe of bug #1204355. 1: https://fedoraproject.org/wiki/Packaging:Python#Byte_compiling
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle. Changing version to '23'. (As we did not run this process for some time, it could affect also pre-Fedora 23 development cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.) More information and reason for this action is here: https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora23
Description of problem: I don't know how this happened ... However, I think that gdb really shouldn't try to write to /usr/... Additional info: reporter: libreport-2.6.3 hashmarkername: setroubleshoot kernel: 4.2.6-301.fc23.x86_64 type: libreport
Description of problem: Happens after audacity crashes due to an unrelated problem Additional info: reporter: libreport-2.6.3 hashmarkername: setroubleshoot kernel: 4.2.7-300.fc23.x86_64 type: libreport
Description of problem: I got some crash after trying to play a video. This report appeared right after that. Obviously, gdb is trying something it shouldn't - bug in gdb, not in selinux. (And I think I've already seen this, this report is probably duplicate.) Additional info: reporter: libreport-2.6.3 hashmarkername: setroubleshoot kernel: 4.2.8-300.fc23.x86_64 type: libreport
The problem is that some tool (Kernel?) is launching gdb from a confined program when it crashes. This gdb is launched in the context of the crashed app, which is not allowed to do some of the things that gdb needs to do. Since we don't want to allow all confined apps that this could happen to, gdb access, we need a way to launch the gdb with a different context. What tool launches gdb? Most likely we would need a kernel change for this.
> The problem is that some tool (Kernel?) is launching gdb from a confined program when it crashes. abrtd is launching gdb. > This gdb is launched in the context of the crashed app, which is not allowed to do some of the things that gdb needs to do. I think that this gdb is launched in the context of abrtd. > Since we don't want to allow all confined apps that this could happen to, gdb access, we need a way to launch the gdb with a different context We just need to ship byte compiled Python files. See comment #6 > What tool launches gdb? abrtd > Most likely we would need a kernel change for this. We just need to fix a packaging bug. See comment #6 and bug #1204355
Just to add to Jakub's comments in comment #12, this isn't a kernel issue, but rather some combination of packaging and/or abrtd policy.
Yes in this case it is run by abrt, in other cases I have seen gdb running under the context of the crashing application.
Googling "selinux preventing gdb site:bugzilla.redhat.com" Finds the following using contexts other then abrt_t. https://bugzilla.redhat.com/show_bug.cgi?id=810447 https://bugzilla.redhat.com/show_bug.cgi?id=546380 https://bugzilla.redhat.com/show_bug.cgi?id=834768
Description of problem: Occured during abrt reporting process Version-Release number of selected component: selinux-policy-3.13.1-158.fc23.noarch Additional info: reporter: libreport-2.6.3 hashmarkername: setroubleshoot kernel: 4.2.8-300.fc23.x86_64+debug type: libreport
Description of problem: This happened several times, the most recent was after debugging a c++ program. Version-Release number of selected component: selinux-policy-3.13.1-158.fc23.noarch selinux-policy-3.13.1-158.2.fc23.noarch Additional info: reporter: libreport-2.6.3 hashmarkername: setroubleshoot kernel: 4.4.1 type: libreport
I'm not sure if it's relevant, but these are my versions of abrt/libstdc++ libstdc++.i686 5.3.1-2.fc23 libstdc++.x86_64 5.3.1-2.fc23
Description of problem: After rhythmbox crashed, bug #1295183, see https://bugzilla.redhat.com/show_bug.cgi?id=1295183 Version-Release number of selected component: selinux-policy-3.13.1-158.9.fc23.noarch Additional info: reporter: libreport-2.6.4 hashmarkername: setroubleshoot kernel: 4.4.4-301.fc23.x86_64 type: libreport
looks like cant reproduce anymore.
(In reply to Igor Gnatenko from comment #20) > looks like cant reproduce anymore. The bug is not fixed. See bug #1204355 comment #18 and bug #1204355 comment #19. We can close the bug as WONTFIX but definitely not CURRENTRELEASE. However, in my opinion, the decision is up to gcc maintainers.
This message is a reminder that Fedora 23 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 23. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '23'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 23 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle. Changing version to '26'.
This message is a reminder that Fedora 26 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 26. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '26'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 26 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.