crypto: qat - protect service table iterations with service_lock
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ d8cba25d2c68992a6e7c1d329b690a9ebe01167d · < 5c6f845e77ec35f9b7b047cc8f9789bf397cdd3e| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
crypto: qat - protect service table iterations with service_lock
The service_table list is protected by service_lock when entries are added or removed (in adf_service_add() and adf_service_remove()), but several functions iterate over the list without holding this lock.
A concurrent adf_service_register() or adf_service_unregister() call could modify the list during traversal, leading to list corruption or a use-after-free.
Fix this by holding service_lock across all list_for_each_entry() iterations of service_table in adf_dev_init(), adf_dev_start(), adf_dev_stop(), adf_dev_shutdown(), adf_dev_restarting_notify(), adf_dev_restarted_notify(), and adf_error_notifier().
The lock ordering is safe: callers of the static helpers (adf_dev_up() and adf_dev_down()) acquire state_lock before service_lock, and no event_hld callback or service_lock holder ever acquires state_lock in the reverse order.
From the CVE record · Linux
The Linux kernel’s crypto qat driver iterates over its service table without holding the lock used when entries are added or removed. A concurrent service registration or unregistration can corrupt the list or cause a use-after-free. The input does not specify an attacker access path or authentication requirements.
Engineers running Linux kernels with the crypto qat driver should check their deployments; affected versions are not specified.