accel/amdxdna: Validate command buffer payload count
authorLizhi Hou <lizhi.hou@amd.com>
Thu, 19 Feb 2026 21:19:46 +0000 (13:19 -0800)
committerLizhi Hou <lizhi.hou@amd.com>
Mon, 23 Feb 2026 17:24:21 +0000 (09:24 -0800)
commit901ec3470994006bc8dd02399e16b675566c3416
treebc9c919326abad402a07cba28c9dd1aaba4c4092
parent03808abb1d868aed7478a11a82e5bb4b3f1ca6d6
accel/amdxdna: Validate command buffer payload count

The count field in the command header is used to determine the valid
payload size. Verify that the valid payload does not exceed the remaining
buffer space.

Fixes: aac243092b70 ("accel/amdxdna: Add command execution")
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
Link: https://patch.msgid.link/20260219211946.1920485-1-lizhi.hou@amd.com
drivers/accel/amdxdna/amdxdna_ctx.c