accel/amdxdna: fix two NULL-deref DoS paths reachable via AMDXDNA_EXEC_CMD
Status from this message: Applied to drm-misc-fixes
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | accel/amdxdna: reject user command submission without a command BOdrivers/ | +10 | 2 replies | |
| 2/2 | accel/amdxdna: reject command submission on devices without a submit opdrivers/ | +4 | 2 replies |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Lizhi Hou |
|---|---|
| 1/2 | R-b |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/2] accel/amdxdna: fix two NULL-deref DoS paths reachable via AMDXDNA_EXEC_CMD
An unprivileged process with access to an AMD NPU accel node can oops the kernel with a single AMDXDNA_EXEC_CMD ioctl. Two distinct NULL dereferences are reachable on the command-submit path, both since the driver first gained command execution:
1. cmd_handles = 0 (AMDXDNA_INVALID_BO_HANDLE) leaves job->cmd_bo NULL, dereferenced later by the DRM scheduler.
2. On an AIE4 device (no .cmd_submit op) the ioctl calls a NULL function pointer.
Both are availability-only (local DoS), no memory corruption. Found by static analysis; verified against source, not runtime-reproduced (no NPU on hand).
Doruk Tan Ozturk (2):
accel/amdxdna: reject user command submission without a command BO accel/amdxdna: reject command submission on devices without a submit
op
drivers/accel/amdxdna/amdxdna_ctx.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
Signature · 1 line
2.43.0