Linux: Double Free
CVE-2025-38582 is a high-severity double free vulnerability in Linux, with a CVSS 3.1 base score of 7.8 out of 10. It can be exploited with local access to the system by an attacker with a low-privileged account, without any action from a user. The record lists versions 5a791715803304bf81ae2a3a278f606e36b82481, 067ca15be8b8342931536b66206c496e76864ecf, dab173bae3303f074f063750a8dead2550d8c782 as the first without the flaw, so updating Linux to one of those releases or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 0.23% chance of exploitation within 30 days, which is low compared with other CVEs.
High severity with no evidence of exploitation so far.
What to do
- Update Linux to 5a791715803304bf81ae2a3a278f606e36b82481 or 067ca15be8b8342931536b66206c496e76864ecf or dab173bae3303f074f063750a8dead2550d8c782 or fc8b0f5b16bab2e032b4cfcd6218d5df3b80b2ea, whichever matches your release line, or a later version.
- Update Linux Kernel to 6.2 or 6.7 or 6.11 or 6.12.42, whichever matches your release line, or a later version.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Linux | Linux | 2ccf1c75d39949d8ea043d04a2e92d7100ea723d up to, but not including, 5a791715803304bf81ae2a3a278f606e36b82481; d2d9c5127122745da6e887f451dd248cfeffca33 up to, but not including, 067ca15be8b8342931536b66206c496e76864ecf; fd8489294dd2beefb70f12ec4f6132aeec61a4d0 up to, but not including, dab173bae3303f074f063750a8dead2550d8c782; fd8489294dd2beefb70f12ec4f6132aeec61a4d0 up to, but not including, fc8b0f5b16bab2e032b4cfcd6218d5df3b80b2ea; fd8489294dd2beefb70f12ec4f6132aeec61a4d0 up to, but not including, 10b083dbba22be19baa848432b6f25aa68ab2db5; fd8489294dd2beefb70f12ec4f6132aeec61a4d0 up to, but not including, c6957b95ecc5b63c5a4bb4ecc28af326cf8f6dc8; dac2723d8bfa9cf5333f477741e6e5fa1ed34645; 60595923371c2ebe7faf82536c47eb0c967e3425; and 5 more ranges | 5a791715803304bf81ae2a3a278f606e36b82481, 067ca15be8b8342931536b66206c496e76864ecf, dab173bae3303f074f063750a8dead2550d8c782, fc8b0f5b16bab2e032b4cfcd6218d5df3b80b2ea, 10b083dbba22be19baa848432b6f25aa68ab2db5, c6957b95ecc5b63c5a4bb4ecc28af326cf8f6dc8 |
| Linux | Linux Kernel | 6.1.113 up to, but not including, 6.2; 6.6.54 up to, but not including, 6.7; 6.10.13 up to, but not including, 6.11; 6.11.2 up to, but not including, 6.12.42; 6.13 up to, but not including, 6.15.10; 6.16 up to, but not including, 6.16.1 | 6.2, 6.7, 6.11, 6.12.42, 6.15.10, 6.16.1 |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- LocalThe attacker needs local access or must trick a user into running something.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- LowA basic user account is enough.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 7.8 | High | CNA |
| CVSS 3.1 | 7.8 | High | NVD |
Official description
In the Linux kernel, the following vulnerability has been resolved: RDMA/hns: Fix double destruction of rsv_qp rsv_qp may be double destroyed in error flow, first in free_mr_init(), and then in hns_roce_exit(). Fix it by moving the free_mr_init() call into hns_roce_v2_init(). list_del corruption, ffff589732eb9b50->next is LIST_POISON1 (dead000000000100) WARNING: CPU: 8 PID: 1047115 at lib/list_debug.c:53 __list_del_entry_valid+0x148/0x240 ... Call trace: __list_del_entry_valid+0x148/0x240 hns_roce_qp_remove+0x4c/0x3f0 [hns_roce_hw_v2] hns_roce_v2_destroy_qp_common+0x1dc/0x5f4 [hns_roce_hw_v2] hns_roce_v2_destroy_qp+0x22c/0x46c [hns_roce_hw_v2] free_mr_exit+0x6c/0x120 [hns_roce_hw_v2] hns_roce_v2_exit+0x170/0x200 [hns_roce_hw_v2] hns_roce_exit+0x118/0x350 [hns_roce_hw_v2] __hns_roce_hw_v2_init_instance+0x1c8/0x304 [hns_roce_hw_v2] hns_roce_hw_v2_reset_notify_init+0x170/0x21c [hns_roce_hw_v2] hns_roce_hw_v2_reset_notify+0x6c/0x190 [hns_roce_hw_v2] hclge_notify_roce_client+0x6c/0x160 [hclge] hclge_reset_rebuild+0x150/0x5c0 [hclge] hclge_reset+0x10c/0x140 [hclge] hclge_reset_subtask+0x80/0x104 [hclge] hclge_reset_service_task+0x168/0x3ac [hclge] hclge_service_task+0x50/0x100 [hclge] process_one_work+0x250/0x9a0 worker_thread+0x324/0x990 kthread+0x190/0x210 ret_from_fork+0x10/0x18
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Double Free
The product calls free() twice on the same memory address.
How developers prevent this class of flaw
- Choose a language that provides automatic memory management.
- Ensure that each allocation is freed only once. After freeing a chunk, set the pointer to NULL to ensure the pointer cannot be freed again. In complicated error conditions, be sure that clean-up routines respect the state of allocation properly. If the language is object oriented, ensure that object destructors delete each chunk of memory only once.
- Use a static analysis tool to find double free instances.
Timeline
- CVE record published.
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
Other references
Recent Double Free vulnerabilities
- 7.8 High severity
- 7.5 High severity
- 8.6 High severity
- 7.2 High severity
- 8.8 High severity
- 7.5 High severity
Spotted an error? Tell us.