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().
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
| Attack Vector | LOCAL |
|---|---|
| Attack Complexity | HIGH |
| Privileges Required | LOW |
| User Interaction | NONE |
| Scope | UNCHANGED |
| Confidentiality Impact | HIGH |
| Integrity Impact | HIGH |
| Availability Impact | HIGH |
| Source | Type | Description |
|---|---|---|
| [email protected] | Primary |
en
CWE-367
en
CWE-416
|
| Vendor | Product | Version | Update | Type |
|---|---|---|---|---|
| linux | linux_kernel | * | <built-in method update of dict object at 0x7fd37019e300> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7fd37019f540> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7fd31b2d9b40> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7fd386776140> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7fd37019f200> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7fd37019dd80> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7fd370267b80> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7fd340ad5680> | Operating System |
| debian | debian_linux | 10.0 | <built-in method update of dict object at 0x7fd370267100> | Operating System |
| Vulnerable | CPE |
|---|---|
| Yes | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* |
| Vulnerable | CPE |
|---|---|
| Yes | cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:* |