diff options
| author | Lizhi Hou <lizhi.hou@amd.com> | 2026-02-17 10:54:15 -0800 |
|---|---|---|
| committer | Lizhi Hou <lizhi.hou@amd.com> | 2026-02-23 09:24:20 -0800 |
| commit | 1110a949675ebd56b3f0286e664ea543f745801c (patch) | |
| tree | 37a8945ceb26be0a066f9fb6134abe57b908a90f /tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git | |
| parent | 07efce5a6611af6714ea3ef65694e0c8dd7e44f5 (diff) | |
accel/amdxdna: Fix out-of-bounds memset in command slot handling
The remaining space in a command slot may be smaller than the size of
the command header. Clearing the command header with memset() before
verifying the available slot space can result in an out-of-bounds write
and memory corruption.
Fix this by moving the memset() call after the size validation.
Fixes: 3d32eb7a5ecf ("accel/amdxdna: Fix cu_idx being cleared by memset() during command setup")
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
Link: https://patch.msgid.link/20260217185415.1781908-1-lizhi.hou@amd.com
Diffstat (limited to 'tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
