diff options
| author | Osama Abdelkader <osama.abdelkader@gmail.com> | 2026-08-04 18:00:47 +0200 |
|---|---|---|
| committer | Liviu Dudau <liviu.dudau@arm.com> | 2026-09-30 16:57:26 +0100 |
| commit | 00d4e932258fc5f2ace62daac307bd903ee400f5 (patch) | |
| tree | 51fc9be89469d02c3bd8632c03bb75dfda1ff25b /tools/perf/scripts/python/stackcollapse.py | |
| parent | 4b7a49d66c8398a7984dff4ac54d1acc6b3a58df (diff) | |
| download | linux-00d4e932258fc5f2ace62daac307bd903ee400f5.tar.gz linux-00d4e932258fc5f2ace62daac307bd903ee400f5.zip | |
drm/panthor: validate userspace queue count against initialized firmware slot count
In panthor_drv.c:panthor_ioctl_group_create(),
the queue count is validated against the hardcoded maximum:
if (!args->queues.count || args->queues.count > MAX_CS_PER_CSG)
return -EINVAL;
However, if the firmware reports fewer slots than MAX_CS_PER_CSG,
panthor_fw_init_ifaces() will only initialize that smaller number of
stream interfaces.
If unprivileged userspace requests more queues than the firmware reported
(but no more than MAX_CS_PER_CSG), cs_slot_prog_locked() fetches an
uninitialized stream interface and may crash when dereferencing
cs_iface->input->ringbuf_base.
Fixes: de8548813824 ("drm/panthor: Add the scheduler logical block")
Cc: stable@vger.kernel.org
Reported-by: sashiko-bot@kernel.org
Closes: https://sashiko.dev/#/patchset/20260803141149.68182-1-osama.abdelkader@gmail.com?part=1
Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Link: https://patch.msgid.link/20260804160048.174148-1-osama.abdelkader@gmail.com
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
