diff options
| author | Sunday Clement <Sunday.Clement@amd.com> | 2026-05-19 10:02:30 -0400 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2026-06-04 15:25:39 -0400 |
| commit | 39eb6da7acee8d0cc12a8959235b590f295d7b4c (patch) | |
| tree | 6cc9e185e0e90271d8a837c5d3848c4dfcc6ee67 /include/linux/debugobjects.h | |
| parent | 59720bfd8c6dbebeb8d5a7ab64241b007efd9213 (diff) | |
drm/amdkfd: Add bounds check for AMDKFD_IOC_WAIT_EVENTS
The kfd_wait_on_events ioctl passes a user-supplied num_events parameter
directly to alloc_event_waiters() which calls kcalloc() without validation.
This allows unprivileged users with /dev/kfd access to trigger large kernel
memory allocations, potentially causing memory exhaustion and denial of
service via the OOM killer.
Add a check to reject num_events values exceeding KFD_SIGNAL_EVENT_LIMIT
(4096), which is the maximum number of events a single process can create.
Signed-off-by: Sunday Clement <Sunday.Clement@amd.com>
Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions
