]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
Merge tag 'audit-pr-20180605' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoor...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 6 Jun 2018 23:34:00 +0000 (16:34 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 6 Jun 2018 23:34:00 +0000 (16:34 -0700)
Pull audit updates from Paul Moore:
 "Another reasonable chunk of audit changes for v4.18, thirteen patches
  in total.

  The thirteen patches can mostly be broken down into one of four
  categories: general bug fixes, accessor functions for audit state
  stored in the task_struct, negative filter matches on executable
  names, and extending the (relatively) new seccomp logging knobs to the
  audit subsystem.

  The main driver for the accessor functions from Richard are the
  changes we're working on to associate audit events with containers,
  but I think they have some standalone value too so I figured it would
  be good to get them in now.

  The seccomp/audit patches from Tyler apply the seccomp logging
  improvements from a few releases ago to audit's seccomp logging;
  starting with this patchset the changes in
  /proc/sys/kernel/seccomp/actions_logged should apply to both the
  standard kernel logging and audit.

  As usual, everything passes the audit-testsuite and it happens to
  merge cleanly with your tree"

[ Heh, except it had trivial merge conflicts with the SELinux tree that
  also came in from Paul   - Linus ]

* tag 'audit-pr-20180605' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit:
  audit: Fix wrong task in comparison of session ID
  audit: use existing session info function
  audit: normalize loginuid read access
  audit: use new audit_context access funciton for seccomp_actions_logged
  audit: use inline function to set audit context
  audit: use inline function to get audit context
  audit: convert sessionid unset to a macro
  seccomp: Don't special case audited processes when logging
  seccomp: Audit attempts to modify the actions_logged sysctl
  seccomp: Configurable separator for the actions_logged string
  seccomp: Separate read and write code for actions_logged sysctl
  audit: allow not equal op for audit by executable
  audit: add syscall information to FEATURE_CHANGE records

1  2 
include/net/xfrm.h
kernel/fork.c
kernel/seccomp.c
net/bridge/netfilter/ebtables.c
net/core/dev.c
net/netfilter/x_tables.c
security/selinux/hooks.c
security/selinux/selinuxfs.c
security/selinux/ss/services.c

Simple merge
diff --cc kernel/fork.c
Simple merge
Simple merge
Simple merge
diff --cc net/core/dev.c
Simple merge
Simple merge
Simple merge
index c0cadbc5f85cd23fbb37ee20f2d88dba3e97f779,35fd77737c599416278a2b05ede272c2bdc832ae..f3d374d2ca045ce7325b20ad3cecb6304418d1b3
@@@ -167,13 -167,11 +167,13 @@@ static ssize_t sel_write_enforce(struc
                                      NULL);
                if (length)
                        goto out;
-               audit_log(current->audit_context, GFP_KERNEL, AUDIT_MAC_STATUS,
+               audit_log(audit_context(), GFP_KERNEL, AUDIT_MAC_STATUS,
 -                      "enforcing=%d old_enforcing=%d auid=%u ses=%u",
 +                      "enforcing=%d old_enforcing=%d auid=%u ses=%u"
 +                      " enabled=%d old-enabled=%d lsm=selinux res=1",
                        new_value, old_value,
                        from_kuid(&init_user_ns, audit_get_loginuid(current)),
 -                      audit_get_sessionid(current));
 +                      audit_get_sessionid(current),
 +                      selinux_enabled, selinux_enabled);
                enforcing_set(state, new_value);
                if (new_value)
                        avc_ss_reset(state->avc, 0);
@@@ -303,12 -299,10 +303,12 @@@ static ssize_t sel_write_disable(struc
                length = selinux_disable(fsi->state);
                if (length)
                        goto out;
-               audit_log(current->audit_context, GFP_KERNEL, AUDIT_MAC_STATUS,
+               audit_log(audit_context(), GFP_KERNEL, AUDIT_MAC_STATUS,
 -                      "selinux=0 auid=%u ses=%u",
 +                      "enforcing=%d old_enforcing=%d auid=%u ses=%u"
 +                      " enabled=%d old-enabled=%d lsm=selinux res=1",
 +                      enforcing, enforcing,
                        from_kuid(&init_user_ns, audit_get_loginuid(current)),
 -                      audit_get_sessionid(current));
 +                      audit_get_sessionid(current), 0, 1);
        }
  
        length = count;
@@@ -581,8 -575,8 +581,8 @@@ static ssize_t sel_write_load(struct fi
        length = count;
  
  out1:
-       audit_log(current->audit_context, GFP_KERNEL, AUDIT_MAC_POLICY_LOAD,
+       audit_log(audit_context(), GFP_KERNEL, AUDIT_MAC_POLICY_LOAD,
 -              "policy loaded auid=%u ses=%u",
 +              "auid=%u ses=%u lsm=selinux res=1",
                from_kuid(&init_user_ns, audit_get_loginuid(current)),
                audit_get_sessionid(current));
  out:
Simple merge