net: hns3: make sure ptp clock is unregister and freed if hclge_ptp_get_cycle returns an error
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 8373cd38a8888549ace7c7617163a2e826970a92 · < b7365eab39831487a84e63a9638209b68dc54008| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net: hns3: make sure ptp clock is unregister and freed if hclge_ptp_get_cycle returns an error
During the initialization of ptp, hclge_ptp_get_cycle might return an error and returned directly without unregister clock and free it. To avoid that, call hclge_ptp_destroy_clock to unregist and free clock if hclge_ptp_get_cycle failed.
From the CVE record · Linux
The Linux kernel's hns3 driver fails to unregister and free a PTP clock if hclge_ptp_get_cycle returns an error during initialization. This can leave the clock allocated; the input does not establish an attacker action, access requirement, or user interaction.
Engineers running Linux kernels with the hns3 driver should check their installations; affected versions are not specified.