accel/rocket: initialize job domain before cleanup paths
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 |
|
|
6.18.507.2.47.3In the Linux kernel, the following vulnerability has been resolved:
accel/rocket: initialize job domain before cleanup paths
rocket_ioctl_submit_job() releases rjob through rocket_job_put() on allocation error paths. rocket_job_cleanup() unconditionally calls rocket_iommu_domain_put(job->domain), but job->domain is assigned only after task copying and BO lookups. A failure before that assignment can therefore clean up a job with a NULL domain pointer.
Take the per-file domain reference before the first error path can release rjob. Also clear rjob->tasks after freeing it in rocket_copy_tasks(), so the common cleanup path cannot free the task array again after a task-copy error.
From the CVE record · Linux
The Linux kernel’s accel/rocket job-submission path can clean up a job before its IOMMU domain is assigned, and a task-copy error can leave its task array subject to a second free. A local caller submitting a job that encounters one of these errors can trigger the faulty cleanup; the input does not specify authentication requirements or further impact.
Engineers running Linux kernels with the accel/rocket component should check whether their kernel includes the fix; affected versions are not specified.