iommu/vt-d: Fix potential memory leak in intel_setup_irq_remapping()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ e3beca48a45b5e0e6e6a4e0124276b8248dcc9bb · < b62eceb5f8f08815fe3f945fc55bbf997c344ecd| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
iommu/vt-d: Fix potential memory leak in intel_setup_irq_remapping()
After commit e3beca48a45b ("irqdomain/treewide: Keep firmware node unconditionally allocated"). For tear down scenario, fn is only freed after fail to allocate ir_domain, though it also should be freed in case dmar_enable_qi returns error.
Besides free fn, irq_domain and ir_msi_domain need to be removed as well if intel_setup_irq_remapping fails to enable queued invalidation.
Improve the rewinding path by add out_free_ir_domain and out_free_fwnode lables per Baolu's suggestion.
From the CVE record · Linux
The Linux kernel may leak memory in intel_setup_irq_remapping() if enabling queued invalidation fails during teardown. The input does not describe an attacker-triggered path, authentication requirements, or user interaction.
Engineers running Linux kernels with Intel VT-d IRQ remapping should check their versions; affected versions are not specified.