diff options
| author | Jann Horn <jannh@google.com> | 2026-08-06 21:41:35 +0200 |
|---|---|---|
| committer | Casey Schaufler <casey@schaufler-ca.com> | 2026-08-08 09:47:22 -0700 |
| commit | fedc88e38ce979a720cd2de042578cb5df3dc8de (patch) | |
| tree | c60ca320dc385d4c715e945e786d9bafae8e835e /tools/perf/scripts/python/stackcollapse.py | |
| parent | a7c44fd9f80e37763acf9cd3c87a58058d206427 (diff) | |
smack: fix cred UAF in smack_file_send_sigiotask()
When inspecting the credentials of another task, objective credentials
(->real_cred, accessed with __task_cred()) must always be used.
Accessing ->cred on a non-current task is forbidden unless that task is
being created or destroyed; a task is allowed to change its own ->cred
pointer with no synchronization, and changing ->cred should only affect the
current syscall.
smack_file_send_sigiotask() was accessing both sets of credentials: First
tsk->cred, then __task_cred(tsk).
Fix it, always access the objective credentials here.
I have tested that this bug can lead to a KASAN-reported UAF of struct cred
in smack_file_send_sigiotask(), and that this fix prevents the race.
Cc: stable@vger.kernel.org
Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
