android_kernel_lge_bullhead/security/selinux/ss
Stephen Smalley fadcf3a330 UPSTREAM: selinux: fix bug in conditional rules handling
(cherry picked from commit commit f3bef67992e8698897b584616535803887c4a73e).

commit fa1aa143ac4a ("selinux: extended permissions for ioctls")
introduced a bug into the handling of conditional rules, skipping the
processing entirely when the caller does not provide an extended
permissions (xperms) structure.  Access checks from userspace using
/sys/fs/selinux/access do not include such a structure since that
interface does not presently expose extended permission information.
As a result, conditional rules were being ignored entirely on userspace
access requests, producing denials when access was allowed by
conditional rules in the policy.  Fix the bug by only skipping
computation of extended permissions in this situation, not the entire
conditional rules processing.

Change-Id: I24f39e3907d0b00a4194e15a4472e8d859508fa9
Reported-by: Laurent Bigonville <bigon@debian.org>
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
[PM: fixed long lines in patch description]
Cc: stable@vger.kernel.org # 4.3
Signed-off-by: Paul Moore <pmoore@redhat.com>
Git-commit: bd8d3dd3ae35f283f3b76e47b9762225c9f7d46c
Git-repo: https://android.googlesource.com/kernel/common/
Signed-off-by: David Ng <dave@codeaurora.org>
Signed-off-by: Bharat Pawar <bpawar@codeaurora.org>
2019-08-26 17:02:55 +02:00
..
avtab.c selinux: Android kernel compatibility with M userspace 2015-11-19 11:04:09 -08:00
avtab.h selinux: extended permissions for ioctls 2015-11-19 11:04:07 -08:00
conditional.c UPSTREAM: selinux: fix bug in conditional rules handling 2019-08-26 17:02:55 +02:00
conditional.h selinux: extended permissions for ioctls 2015-11-19 11:04:07 -08:00
constraint.h SELinux: Update policy version to support constraints info 2015-04-20 15:15:28 -07:00
context.h SELinux: allow default source/target selectors for user/role/range 2012-04-09 12:22:47 -04:00
ebitmap.c doc: Update the email address for Paul Moore in various source files 2011-08-01 17:58:33 -07:00
ebitmap.h security:selinux: kill unused MAX_AVTAB_HASH_MASK and ebitmap_startbit 2011-01-24 10:36:11 +11:00
hashtab.c selinux: conditionally reschedule in hashtab_insert while loading selinux policy 2019-08-26 17:02:54 +02:00
hashtab.h SELinux: hashtab.h whitespace, syntax, and other cleanups 2008-04-28 09:29:04 +10:00
mls.c selinux: conditionally reschedule in mls_convert_context while loading selinux policy 2019-08-26 17:02:53 +02:00
mls.h doc: Update the email address for Paul Moore in various source files 2011-08-01 17:58:33 -07:00
mls_types.h selinux: allow MLS->non-MLS and vice versa upon policy reload 2010-02-04 09:06:36 +11:00
policydb.c selinux: extended permissions for ioctls 2015-11-19 11:04:07 -08:00
policydb.h SELinux: Update policy version to support constraints info 2015-04-20 15:15:28 -07:00
services.c selinux: no recursive read_lock of policy_rwlock in security_genfs_sid() 2019-08-26 17:02:53 +02:00
services.h selinux: extended permissions for ioctls 2015-11-19 11:04:07 -08:00
sidtab.c selinux: cache sidtab_context_to_sid results 2010-12-07 16:44:01 -05:00
sidtab.h selinux: cache sidtab_context_to_sid results 2010-12-07 16:44:01 -05:00
status.c selinux: fix up style problem on /selinux/status 2010-10-21 10:12:41 +11:00
symtab.c selinux: fix error codes in symtab_init() 2010-08-02 15:35:04 +10:00
symtab.h