drivers/perf: hisi: hns3: Actually use devm_add_action_or_reset()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
drivers/perf: hisi: hns3: Actually use devm_add_action_or_reset()
pci_alloc_irq_vectors() allocates an irq vector. When devm_add_action() fails, the irq vector is not freed, which leads to a memory leak.
Replace the devm_add_action with devm_add_action_or_reset to ensure the irq vector can be destroyed when it fails.
From the CVE record · Linux
The Linux kernel HNS3 perf driver can leak an allocated IRQ vector when devm_add_action() fails. The input does not describe an attacker action, access requirements, or user interaction; the stated impact is a memory leak under that failure condition.
Engineers running Linux kernels with the HNS3 perf driver should check their versions against the vendor advisory; affected versions are not specified.