accel/amdxdna: Fix an integer overflow in aie2_query_ctx_status_array()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
accel/amdxdna: Fix an integer overflow in aie2_query_ctx_status_array()
The unpublished smatch static checker reported a warning.
drivers/accel/amdxdna/aie2_pci.c:904 aie2_query_ctx_status_array() warn: potential user controlled sizeof overflow 'args->num_element * args->element_size' '1-u32max(user) * 1-u32max(user)'
Even this will not cause a real issue, it is better to put a reasonable limitation for element_size and num_element. Add condition to make sure the input element_size <= 4K and num_element <= 1K.
From the CVE record · Linux
The Linux kernel's amdxdna driver has a potential integer overflow when calculating the size of a context status array from user-controlled values. The report says this is not expected to cause a real issue; it does not establish an exploitable impact or specify access requirements.
Engineers running Linux kernels with the amdxdna driver should check whether their kernel includes the fix; affected versions were not provided.