android_kernel_samsung_msm8976/security/selinux/include
Eric Paris b782e0a68d SELinux: special dontaudit for access checks
Currently there are a number of applications (nautilus being the main one) which
calls access() on files in order to determine how they should be displayed.  It
is normal and expected that nautilus will want to see if files are executable
or if they are really read/write-able.  access() should return the real
permission.  SELinux policy checks are done in access() and can result in lots
of AVC denials as policy denies RWX on files which DAC allows.  Currently
SELinux must dontaudit actual attempts to read/write/execute a file in
order to silence these messages (and not flood the logs.)  But dontaudit rules
like that can hide real attacks.  This patch addes a new common file
permission audit_access.  This permission is special in that it is meaningless
and should never show up in an allow rule.  Instead the only place this
permission has meaning is in a dontaudit rule like so:

dontaudit nautilus_t sbin_t:file audit_access

With such a rule if nautilus just checks access() we will still get denied and
thus userspace will still get the correct answer but we will not log the denial.
If nautilus attempted to actually perform one of the forbidden actions
(rather than just querying access(2) about it) we would still log a denial.
This type of dontaudit rule should be used sparingly, as it could be a
method for an attacker to probe the system permissions without detection.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by:  Stephen D. Smalley <sds@tycho.nsa.gov>
Signed-off-by: James Morris <jmorris@namei.org>
2010-08-02 15:35:07 +10:00
..
audit.h
avc.h SELinux: Convert avc_audit to use lsm_audit.h 2009-08-17 08:37:18 +10:00
avc_ss.h selinux: dynamic class/perm discovery 2009-10-07 21:56:42 +11:00
classmap.h SELinux: special dontaudit for access checks 2010-08-02 15:35:07 +10:00
conditional.h
initial_sid_to_string.h selinux: const strings in tables 2010-03-08 09:33:53 +11:00
netif.h
netlabel.h selinux: always call sk_security_struct sksec 2010-04-08 09:17:02 +10:00
netnode.h
netport.h
objsec.h switch selinux delayed superblock handling to iterate_supers() 2010-05-21 18:31:17 -04:00
security.h selinux: allow MLS->non-MLS and vice versa upon policy reload 2010-02-04 09:06:36 +11:00
xfrm.h SELinux: Convert avc_audit to use lsm_audit.h 2009-08-17 08:37:18 +10:00