// For flags

CVE-2021-47424

i40e: Fix freeing of uninitialized misc IRQ vector

Severity Score

"-"
*CVSS v-

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:

i40e: Fix freeing of uninitialized misc IRQ vector

When VSI set up failed in i40e_probe() as part of PF switch set up
driver was trying to free misc IRQ vectors in
i40e_clear_interrupt_scheme and produced a kernel Oops:

Trying to free already-free IRQ 266
WARNING: CPU: 0 PID: 5 at kernel/irq/manage.c:1731 __free_irq+0x9a/0x300
Workqueue: events work_for_cpu_fn
RIP: 0010:__free_irq+0x9a/0x300
Call Trace:
? synchronize_irq+0x3a/0xa0
free_irq+0x2e/0x60
i40e_clear_interrupt_scheme+0x53/0x190 [i40e]
i40e_probe.part.108+0x134b/0x1a40 [i40e]
? kmem_cache_alloc+0x158/0x1c0
? acpi_ut_update_ref_count.part.1+0x8e/0x345
? acpi_ut_update_object_reference+0x15e/0x1e2
? strstr+0x21/0x70
? irq_get_irq_data+0xa/0x20
? mp_check_pin_attr+0x13/0xc0
? irq_get_irq_data+0xa/0x20
? mp_map_pin_to_irq+0xd3/0x2f0
? acpi_register_gsi_ioapic+0x93/0x170
? pci_conf1_read+0xa4/0x100
? pci_bus_read_config_word+0x49/0x70
? do_pci_enable_device+0xcc/0x100
local_pci_probe+0x41/0x90
work_for_cpu_fn+0x16/0x20
process_one_work+0x1a7/0x360
worker_thread+0x1cf/0x390
? create_worker+0x1a0/0x1a0
kthread+0x112/0x130
? kthread_flush_work_fn+0x10/0x10
ret_from_fork+0x1f/0x40

The problem is that at that point misc IRQ vectors
were not allocated yet and we get a call trace
that driver is trying to free already free IRQ vectors.

Add a check in i40e_clear_interrupt_scheme for __I40E_MISC_IRQ_REQUESTED
PF state before calling i40e_free_misc_vector. This state is set only if
misc IRQ vectors were properly initialized.

En el kernel de Linux, se resolvió la siguiente vulnerabilidad: i40e: Se corrigió la liberación de un vector IRQ misceláneo no inicializado. Cuando la configuración de VSI falló en i40e_probe() como parte de la configuración del conmutador PF, el controlador intentaba liberar vectores IRQ misceláneos en i40e_clear_interrupt_scheme y produjo un kernel Oops: Intentando liberar IRQ 266 que ya está libre ADVERTENCIA: CPU: 0 PID: 5 en kernel/irq/manage.c:1731 __free_irq+0x9a/0x300 Cola de trabajo: eventos work_for_cpu_fn RIP: 0010:__free_irq+0x9a/0x300 Seguimiento de llamadas: ? synchronize_irq+0x3a/0xa0 free_irq+0x2e/0x60 i40e_clear_interrupt_scheme+0x53/0x190 [i40e] i40e_probe.part.108+0x134b/0x1a40 [i40e] ? kmem_cache_alloc+0x158/0x1c0? acpi_ut_update_ref_count.part.1+0x8e/0x345? acpi_ut_update_object_reference+0x15e/0x1e2? chain+0x21/0x70 ? irq_get_irq_data+0xa/0x20 ? mp_check_pin_attr+0x13/0xc0? irq_get_irq_data+0xa/0x20 ? mp_map_pin_to_irq+0xd3/0x2f0? acpi_register_gsi_ioapic+0x93/0x170? pci_conf1_read+0xa4/0x100? pci_bus_read_config_word+0x49/0x70? do_pci_enable_device+0xcc/0x100 local_pci_probe+0x41/0x90 work_for_cpu_fn+0x16/0x20 Process_one_work+0x1a7/0x360 worker_thread+0x1cf/0x390 ? create_worker+0x1a0/0x1a0 kthread+0x112/0x130? kthread_flush_work_fn+0x10/0x10 ret_from_fork+0x1f/0x40 El problema es que en ese momento aún no se habían asignado varios vectores IRQ y obtenemos un seguimiento de llamada de que el controlador está intentando liberar vectores IRQ que ya están libres. Agregue una verificación en i40e_clear_interrupt_scheme para el estado __I40E_MISC_IRQ_REQUESTED PF antes de llamar a i40e_free_misc_vector. Este estado se establece solo si se inicializaron correctamente varios vectores IRQ.

*Credits: N/A
CVSS Scores
Attack Vector
-
Attack Complexity
-
Privileges Required
-
User Interaction
-
Scope
-
Confidentiality
-
Integrity
-
Availability
-
* Common Vulnerability Scoring System
SSVC
  • Decision:Track
Exploitation
None
Automatable
No
Tech. Impact
Partial
* Organization's Worst-case Scenario
Timeline
  • 2024-05-21 CVE Reserved
  • 2024-05-21 CVE Published
  • 2024-05-22 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"
>= 4.15 < 4.19.211
Search vendor "Linux" for product "Linux Kernel" and version " >= 4.15 < 4.19.211"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 4.15 < 5.4.153
Search vendor "Linux" for product "Linux Kernel" and version " >= 4.15 < 5.4.153"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 4.15 < 5.10.73
Search vendor "Linux" for product "Linux Kernel" and version " >= 4.15 < 5.10.73"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 4.15 < 5.14.12
Search vendor "Linux" for product "Linux Kernel" and version " >= 4.15 < 5.14.12"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 4.15 < 5.15
Search vendor "Linux" for product "Linux Kernel" and version " >= 4.15 < 5.15"
en
Affected