linux/net/netlabel
Casey Schaufler eb59d494ee audit: add record for multiple task security contexts
Replace the single skb pointer in an audit_buffer with a list of
skb pointers. Add the audit_stamp information to the audit_buffer as
there's no guarantee that there will be an audit_context containing
the stamp associated with the event. At audit_log_end() time create
auxiliary records as have been added to the list. Functions are
created to manage the skb list in the audit_buffer.

Create a new audit record AUDIT_MAC_TASK_CONTEXTS.
An example of the MAC_TASK_CONTEXTS record is:

    type=MAC_TASK_CONTEXTS
      msg=audit(1600880931.832:113)
      subj_apparmor=unconfined
      subj_smack=_

When an audit event includes a AUDIT_MAC_TASK_CONTEXTS record the
"subj=" field in other records in the event will be "subj=?".
An AUDIT_MAC_TASK_CONTEXTS record is supplied when the system has
multiple security modules that may make access decisions based on a
subject security context.

Refactor audit_log_task_context(), creating a new audit_log_subj_ctx().
This is used in netlabel auditing to provide multiple subject security
contexts as necessary.

Suggested-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
[PM: subj tweak, audit example readability indents]
Signed-off-by: Paul Moore <paul@paul-moore.com>
2025-08-30 10:15:30 -04:00
..
Kconfig
Makefile
netlabel_addrlist.c
netlabel_addrlist.h
netlabel_calipso.c calipso: fix memory leak in netlbl_calipso_add_pass() 2023-12-07 14:23:12 -05:00
netlabel_calipso.h
netlabel_cipso_v4.c genetlink: start to validate reserved header bytes 2022-08-29 12:47:15 +01:00
netlabel_cipso_v4.h netlabel: Remove unused declaration netlbl_cipsov4_doi_free() 2023-08-02 12:28:22 -07:00
netlabel_domainhash.c
netlabel_domainhash.h netlabel: Reorder fields in 'struct netlbl_domaddr6_map' 2023-06-20 20:06:56 -07:00
netlabel_kapi.c calipso: unlock rcu before returning -EAFNOSUPPORT 2025-06-05 08:03:38 -07:00
netlabel_mgmt.c net: convert to nla_get_*_default() 2024-11-11 10:32:06 -08:00
netlabel_mgmt.h
netlabel_unlabeled.c net: corrections for security_secid_to_secctx returns 2025-01-04 22:11:22 -05:00
netlabel_unlabeled.h
netlabel_user.c audit: add record for multiple task security contexts 2025-08-30 10:15:30 -04:00
netlabel_user.h netlabel,smack: use lsm_prop for audit data 2024-10-11 14:34:16 -04:00