diff options
| author | Konstantin Andreev <andreev@swemel.ru> | 2026-05-11 03:17:17 +0300 |
|---|---|---|
| committer | Casey Schaufler <casey@schaufler-ca.com> | 2026-06-22 11:16:40 -0700 |
| commit | 0bcb3c5e7101c2df267aabc17b30939da18a2424 (patch) | |
| tree | 9273448e908bacfd2ea08ce297985c0b9b6f66f6 /tools/perf/scripts/python | |
| parent | fba3d32825f4bbc8e20f0cdc3b14df57965b8fe5 (diff) | |
smack: show msgrcv() subject task in audit
When a task msgrcv()'es some message the SMACK audit log message
looks like:
fn=smk_tskacc_msq action=denied subject="bar" object="foo" requested=rw
pid=456 comm="mrcv" ipc_key=2
fn=smk_tskacc_msq action=granted subject="bar" object="foo" requested=rw
pid=519 comm="mrcv" ipc_key=2
where pid= is a pid of a “current” task which calls smk_tskacc_msq().
Usually, the caller of smk_tskacc_msq() is also a subject task
which determines its own permission. In the example above
the 'mrcv' process has label 'bar' and wants "rw" for label "foo".
However, when sender task delivers message using
ipc/msg.c`pipelined_send():
` security_msg_queue_msgrcv(,, msr->r_tsk,,)
` smp_store_release(&msr->r_msg, msg)
“current” task and “subject” task differ, and
the “subject” task is missed from the audit message.
This patch adds two fields, subj_pid and subj_comm,
into the audit message:
fn=smk_tskacc_msq action=granted subject="bar" object="foo" requested=rw
subj_pid=564 subj_comm="mrcv" pid=577 comm="msnd" ipc_key=2
Signed-off-by: Konstantin Andreev <andreev@swemel.ru>
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
