android_kernel_xiaomi_sm8350/security/selinux/include
James Morris b207a290ea [PATCH] SELinux: add finer grained permissions to Netlink audit processing
This patch provides finer grained permissions for the audit family of
Netlink sockets under SELinux.

1.  We need a way to differentiate between privileged and unprivileged
   reads of kernel data maintained by the audit subsystem.  The AUDIT_GET
   operation is unprivileged: it returns the current status of the audit
   subsystem (e.g.  whether it's enabled etc.).  The AUDIT_LIST operation
   however returns a list of the current audit ruleset, which is considered
   privileged by the audit folk.  To deal with this, a new SELinux
   permission has been implemented and applied to the operation:
   nlmsg_readpriv, which can be allocated to appropriately privileged
   domains.  Unprivileged domains would only be allocated nlmsg_read.

2.  There is a requirement for certain domains to generate audit events
   from userspace.  These events need to be collected by the kernel,
   collated and transmitted sequentially back to the audit daemon.  An
   example is user level login, an auditable event under CAPP, where
   login-related domains generate AUDIT_USER messages via PAM which are
   relayed back to auditd via the kernel.  To prevent handing out
   nlmsg_write permissions to such domains, a new permission has been
   added, nlmsg_relay, which is intended for this type of purpose: data is
   passed via the kernel back to userspace but no privileged information is
   written to the kernel.

Also, AUDIT_LOGIN messages are now valid only for kernel->user messaging,
so this value has been removed from the SELinux nlmsgtab (which is only
used to check user->kernel messages).

Signed-off-by: James Morris <jmorris@redhat.com>
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-01 08:58:40 -07:00
..
av_inherit.h [PATCH] SELinux: add support for NETLINK_KOBJECT_UEVENT 2005-04-16 15:24:13 -07:00
av_perm_to_string.h [PATCH] SELinux: add finer grained permissions to Netlink audit processing 2005-05-01 08:58:40 -07:00
av_permissions.h [PATCH] SELinux: add finer grained permissions to Netlink audit processing 2005-05-01 08:58:40 -07:00
avc_ss.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
avc.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
class_to_string.h [PATCH] SELinux: add support for NETLINK_KOBJECT_UEVENT 2005-04-16 15:24:13 -07:00
common_perm_to_string.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
conditional.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
flask.h [PATCH] SELinux: add support for NETLINK_KOBJECT_UEVENT 2005-04-16 15:24:13 -07:00
initial_sid_to_string.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
netif.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
objsec.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
security.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00