// For flags

CVE-2024-26974

crypto: qat - resolve race condition during AER recovery

Severity Score

5.8
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

Track
*SSVC
Descriptions

In the Linux kernel, the following vulnerability has been resolved:

crypto: qat - resolve race condition during AER recovery

During the PCI AER system's error recovery process, the kernel driver
may encounter a race condition with freeing the reset_data structure's
memory. If the device restart will take more than 10 seconds the function
scheduling that restart will exit due to a timeout, and the reset_data
structure will be freed. However, this data structure is used for
completion notification after the restart is completed, which leads
to a UAF bug.

This results in a KFENCE bug notice.

BUG: KFENCE: use-after-free read in adf_device_reset_worker+0x38/0xa0 [intel_qat]
Use-after-free read at 0x00000000bc56fddf (in kfence-#142):
adf_device_reset_worker+0x38/0xa0 [intel_qat]
process_one_work+0x173/0x340

To resolve this race condition, the memory associated to the container
of the work_struct is freed on the worker if the timeout expired,
otherwise on the function that schedules the worker.
The timeout detection can be done by checking if the caller is
still waiting for completion or not by using completion_done() function.

En el kernel de Linux, se resolvió la siguiente vulnerabilidad: crypto: qat: resuelve la condición de ejecución durante la recuperación de AER Durante el proceso de recuperación de errores del sistema PCI AER, el controlador del kernel puede encontrar una condición de ejecución al liberar la memoria de la estructura reset_data. Si el reinicio del dispositivo demora más de 10 segundos, la función que programa el reinicio se cerrará debido a un tiempo de espera y se liberará la estructura reset_data. Sin embargo, esta estructura de datos se utiliza para la notificación de finalización después de que se completa el reinicio, lo que genera un error de UAF. Esto da como resultado un aviso de error de KFENCE. ERROR: KFENCE: lectura de uso después de liberación en adf_device_reset_worker+0x38/0xa0 [intel_qat] Lectura de uso después de liberación en 0x00000000bc56fddf (en kfence-#142): adf_device_reset_worker+0x38/0xa0 [intel_qat] Process_one_work+0x173/0x340 Para resolver En esta condición de ejecución, la memoria asociada al contenedor de work_struct se libera en el trabajador si el tiempo de espera expiró; en caso contrario, en la función que programa al trabajador. La detección del tiempo de espera se puede realizar comprobando si la persona que llama todavía está esperando que finalice o no mediante la función complete_done().

A race condition was found in drivers/crypto/intel/qat/qat_common/adf_aer.c in the Linux kernel during AER recovery.

*Credits: N/A
CVSS Scores
Attack Vector
Local
Attack Complexity
High
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
High
* Common Vulnerability Scoring System
SSVC
  • Decision:Track
Exploitation
None
Automatable
No
Tech. Impact
Partial
* Organization's Worst-case Scenario
Timeline
  • 2024-02-19 CVE Reserved
  • 2024-05-01 CVE Published
  • 2024-05-01 EPSS Updated
  • 2024-12-19 CVE Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 3.17 < 4.19.312
Search vendor "Linux" for product "Linux Kernel" and version " >= 3.17 < 4.19.312"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 3.17 < 5.4.274
Search vendor "Linux" for product "Linux Kernel" and version " >= 3.17 < 5.4.274"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 3.17 < 5.10.215
Search vendor "Linux" for product "Linux Kernel" and version " >= 3.17 < 5.10.215"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 3.17 < 5.15.154
Search vendor "Linux" for product "Linux Kernel" and version " >= 3.17 < 5.15.154"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 3.17 < 6.1.84
Search vendor "Linux" for product "Linux Kernel" and version " >= 3.17 < 6.1.84"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 3.17 < 6.6.24
Search vendor "Linux" for product "Linux Kernel" and version " >= 3.17 < 6.6.24"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 3.17 < 6.7.12
Search vendor "Linux" for product "Linux Kernel" and version " >= 3.17 < 6.7.12"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 3.17 < 6.8.3
Search vendor "Linux" for product "Linux Kernel" and version " >= 3.17 < 6.8.3"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 3.17 < 6.9
Search vendor "Linux" for product "Linux Kernel" and version " >= 3.17 < 6.9"
en
Affected