]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amdkfd: fix SMI event cross-process information leak
authorYongqiang Sun <Yongqiang.Sun@amd.com>
Wed, 27 May 2026 13:50:47 +0000 (09:50 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 4 Jun 2026 19:24:19 +0000 (15:24 -0400)
commit92a8dba246d371fe268280e5fd74b0955688e6df
treef7a0b3c5f68436481ee02bf4d9d02445f5d82e61
parentbadcb0896bdb4c6148564331c4b24ba7635efa94
drm/amdkfd: fix SMI event cross-process information leak

kfd_smi_ev_enabled() skips the suser privilege check when pid=0.
PROCESS_START, PROCESS_END, and VMFAULT events are emitted with
pid=0 while carrying another process's PID and command name, so any
/dev/kfd user in the render group can monitor all GPU workloads.

Pass the target process PID into kfd_smi_event_add() for these events
so the existing per-client filter restricts delivery to the owning
process or CAP_SYS_ADMIN subscribers.

Signed-off-by: Yongqiang Sun <Yongqiang.Sun@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c