accel/ethosu: fix job completion fence cleanup
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/ethosu: fix job completion fence cleanup
ethosu_ioctl_submit_job() allocates done_fence before validating buffer handles. Errors after allocation call ethosu_job_err_cleanup(), which frees the job but leaks the uninitialized fence.
A scheduler dependency error also lets ethosu_job_run() return before dma_fence_init(). Normal cleanup then passes a zeroed refcount to dma_fence_put().
Release done_fence in the common cleanup path and use dma_fence_was_initialized() to distinguish initialized fences from raw allocations.
[robh: also fix goto]
From the CVE record · Linux
The Linux kernel’s Ethos-U job handling can leak a completion fence when buffer-handle validation fails, or pass an uninitialized fence to cleanup after a scheduler dependency error. A local caller submitting a job could trigger these error paths; the input does not specify authentication requirements or further impact.
Engineers running Linux kernels with the Ethos-U driver should check their versions against the vendor advisory; affected versions are not specified.