In the Linux kernel, the following vulnerability has been resolved: wifi: libertas: fix use-after-free in lbs_free_adapter() The lbs_free_adapter() function uses timer_delete() (non-synchronous) for both command_timer and tx_lockup_timer before the structure is freed. This is incorrect because timer_delete() does not wait for any running timer callback to complete. If a timer callback is executing when lbs_free_adapter() is called, the callback will access freed memory since lbs_cfg_free() frees the containing structure immediately after lbs_free_adapter() returns. Both timer callbacks (lbs_cmd_timeout_handler and lbs_tx_lockup_handler) access priv->driver_lock, priv->cur_cmd, priv->dev, and other fields, which would all be use-after-free violations. Use timer_delete_sync() instead to ensure any running timer callback has completed before returning. This bug was introduced in commit 8f641d93c38a ("libertas: detect TX lockups and reset hardware") where del_timer() was used instead of del_timer_sync() in the cleanup path. The command_timer has had the same issue since the driver was first written.
En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: wifi: libertas: corregir uso después de liberación en lbs_free_adapter() La función lbs_free_adapter() usa timer_delete() (no síncrono) para command_timer y tx_lockup_timer antes de que la estructura sea liberada. Esto es incorrecto porque timer_delete() no espera a que ninguna devolución de llamada de temporizador en ejecución se complete. Si una devolución de llamada de temporizador se está ejecutando cuando se llama a lbs_free_adapter(), la devolución de llamada accederá a memoria liberada ya que lbs_cfg_free() libera la estructura contenedora inmediatamente después de que lbs_free_adapter() retorna. Ambas devoluciones de llamada de temporizador (lbs_cmd_timeout_handler y lbs_tx_lockup_handler) acceden a priv->driver_lock, priv->cur_cmd, priv->dev y otros campos, lo que serían todas violaciones de uso después de liberación. Usar timer_delete_sync() en su lugar para asegurar que cualquier devolución de llamada de temporizador en ejecución se haya completado antes de retornar. Este error fue introducido en el commit 8f641d93c38a ('libertas: detectar bloqueos de TX y reiniciar hardware') donde se usó del_timer() en lugar de del_timer_sync() en la ruta de limpieza. El command_timer ha tenido el mismo problema desde que el controlador fue escrito por primera vez.
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
| Attack Vector | LOCAL |
|---|---|
| Attack Complexity | LOW |
| 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-416
|
| Vendor | Product | Version | Update | Type |
|---|---|---|---|---|
| linux | linux_kernel | * | <built-in method update of dict object at 0x7fd369c0c340> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7fd36b233780> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7fd370391c80> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7fd340cf1b80> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7fd36b2337c0> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7fd36b231d80> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7fd36b72bec0> | Operating System |
| linux | linux_kernel | 7.0 | <built-in method update of dict object at 0x7fd36b8a7d00> | 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:7.0:rc1:*:*:*:*:*:* |