When running nautilus I get many many AVC denials with various nautilus related actions (see attached log) Using nautilus-extensions-2.26.1-2.fc11.x86_64 selinux-policy-3.6.12-2.fc11.noarch nautilus-cd-burner-libs-2.25.3-5.fc11.x86_64 nautilus-cd-burner-devel-2.25.3-5.fc11.x86_64 nautilus-devel-2.26.1-2.fc11.x86_64 selinux-policy-targeted-3.6.12-2.fc11.noarch nautilus-2.26.1-2.fc11.x86_64 nautilus-cd-burner-2.25.3-5.fc11.x86_64 nautilus-sendto-1.1.2-4.fc11.x86_64 nautilus-open-terminal-0.9-12.fc11.x86_64
Created attachment 339086 [details] output of ausearch -m AVC | grep nautilus |grep denied
thats gotta be some mislabeling problem
Matej, allow staff_t gnome_home_t:file execute; allow staff_t mozilla_home_t:file execute; Is allowed now in policy, unless you have allow_staff_exec_content turned off. allow staff_t user_tmp_t:sock_file execute; Looks like nautilus is doing an execute access check on a sock_file in /tmp, I don't think it makes any sense to execute a sock_file. I will add dontaudit rules. nautilus also is checking write access to /tmp/.X11-unix directory? So I think the problem is nautilus running around checking access to files and directories using access? Matthias, the reason Matej is seening all these avc's is because he is running with a confined user rather then unconfined_t, Not related to a mislabeling.
If my thoughts are correct on why this is happening, it shows the problem of access generating the actual execute or write rather then just a getattr, which I believe is a kernel problem.
Not sure I follow, sounds like a topic for selinux list. Do you want access(2) to only check SELinux getattr permission to the file, like a stat(2) call would? Rather than checking read/write/execute? At present, access(2) internally calls the kernel's permission() routine, which invokes both DAC and SELinux MAC checks for read/write/execute.
Yes, I would rather have it only generate the getattr access check for MAC. Since it is not actually executing the code, but reading whether the code can be executed, via DAC. So in my mind this is a getattr access check. I understand that it will return the wrong answer on MAC. Which is a problem. Currently we have a dontaudit * krb_conf_t:file write; for every domain that uses kerberos, because the kerberos library does a access(/etc/krb5.conf, W_OK) check. This means we can not tell when an confined domain actually tried to rewrite /etc/krb5.conf. So I would like to somehow answer the access(FILE, MODE) question correctly without generating any other then a getattr access violation.
It seems unwise to hardcode suppression of the auditing of the read/write/execute check (e.g. via _noaudit interface) if we are in fact going to return that result to the caller of access(2); otherwise, we get silent denials with no way to see them if they do in fact break the application. So I think dontaudit rules are your best bet there for silencing those, and then the user still has the option to use semodule -DB to uncover them. If you want to further add a getattr check on access(2), then that just requires adding a call to security_inode_getattr() to sys_faccessat().
But they are different. And we are covering up potential attacks. If every single domain as a dontaudit read of /etc/shadow, because we do an Access check and dontaudit write of /etc/krb5.conf, we can not tell when these files are actually under attack. How about a different check, getattrmac, which we can give to domains that check. Or maybe this becomes a new class. dontaudit abc_t shadow_t:access write;
If we use any permission check other than read/write/execute, then we have the potential for inconsistency between access(2) and open(2) with the same requested access, thereby breaking libraries and applications that are using access(2) to decide whether or not to even attempt an open(2) or fall back on an unprivileged code path, ala libkrb and /etc/krb.conf or pam_unix and /etc/shadow. getattrmac is even worse, as it cannot distinguish read vs. write vs. execute. Separate class leaves open the possibility of inconsistency and loses ability to distinguish based on the actual file class (e.g. dir vs. file vs. chr_file...). I don't see a good option. Might want to take it up on selinux list, cc Eric and James.
So now I either have to dontaudit all attemps by users to execute files in their home directory so that Nautilus will not cause hundreds of AVCs or add a policy for Nautilus which would be very difficult since it needs to be able to do everything the user can do. staff_t + dontaudit HOME/TMP:file execute, +dontaudit HOME/TMP:{ dir file } read;
And transition to staff_t when executing any executable that it can execute.
I'll take it up on selinux list, as I don't think it is really something we can resolve in a bugzilla.
It seems like you're onto this, but yes, to confirm, nautilus uses "access" to determine wheter you're allowed to do things like execute a file. We do this instead of parsing the file mode in order to also correctly work with things like ACLs or selinux denying certain things. So, from the point of nautilus I'd like selinux to report what would actually happen if we e.g. tried to execute something, but not report a violation if it was not allowed.
1) return from access should report what would actually happen if you tried to execute something. - absolutely, there is no reasonable discussion about having access say something is allowed but then it actually be denied. 2) not report a violation if it was not allowed - this is a harder thing. I, for one, see it as a huge problem to usability if selinux is able to deny an operation, but doesn't tell you that it was denied. I think the upstream discussion is going to give us something that will be able to address everyone's concerns, although it going to take some bit of ugliness in the selinux userspace tools to beat out the specifics.
I understand the hesitation to not report this at all. However, at least you need to be able to tell between the actual executing of something and seeing if it is possible.
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle. Changing version to '11'. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Just to note that this is alive and kicking with nautilus-2.26.3-2.fc11.x86_64 and selinux-policy-targeted-3.6.12-77.fc11.noarch.
Eric, what is the current state of this. It seems to have drifted off into the weeds.
*** Bug 518749 has been marked as a duplicate of this bug. ***
This message is a reminder that Fedora 11 is nearing its end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 11. 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 WONTFIX if it remains open with a Fedora 'version' of '11'. 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 prior to Fedora 11's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 11 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 please change the 'version' of this bug to the applicable version. If you are unable to change the version, please add a comment here and someone will do it for you. 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. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Fedora 11 changed to end-of-life (EOL) status on 2010-06-25. Fedora 11 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. Thank you for reporting this bug and we are sorry it could not be fixed.