CVE-2025-22010: RDMA/hns: Fix soft lockup during bt pages loop
In the Linux kernel, the following vulnerability has been resolved:
RDMA/hns: Fix soft lockup during bt pages loop
Driver runs a for-loop when allocating bt pages and mapping them with buffer pages. When a large buffer (e.g. MR over 100GB) is being allocated, it may require a considerable loop count. This will lead to soft lockup:
watchdog: BUG: soft lockup - CPU#27 stuck for 22s! ... Call trace: hemlistallocmidbt+0x124/0x394 [hnsrocehwv2] hnsrocehemlistrequest+0xf8/0x160 [hnsrocehwv2] hnsrocemtrcreate+0x2e4/0x360 [hnsrocehwv2] allocmrpbl+0xd4/0x17c [hnsrocehwv2] hnsroceregusermr+0xf8/0x190 [hnsrocehwv2] ibuverbsregmr+0x118/0x290
watchdog: BUG: soft lockup - CPU#35 stuck for 23s! ... Call trace: hnsrocehemlistfindmtt+0x7c/0xb0 [hnsrocehwv2] mtrmapbufs+0xc4/0x204 [hnsrocehwv2] hnsrocemtrcreate+0x31c/0x3c4 [hnsrocehwv2] allocmrpbl+0xb0/0x160 [hnsrocehwv2] hnsroceregusermr+0x108/0x1c0 [hnsrocehwv2] ibuverbsregmr+0x120/0x2bc
Add a condresched() to fix soft lockup during these loops. In order not to affect the allocation performance of normal-size buffer, set the loop count of a 100GB MR as the threshold to call condresched().
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
Add cond_resched() to the RDMA/hns BT-page allocation and mapping loop, using the page-count threshold corresponding to a 100GB MR before yielding, to prevent soft lockups without affecting normal-size buffer allocation performance.
Event History
Frequently Asked Questions
What is the severity of CVE-2025-22010?
CVE-2025-22010 has a medium severity rating due to the potential for soft lockups during large buffer allocations in the Linux kernel.
How do I fix CVE-2025-22010?
To fix CVE-2025-22010, update your Linux kernel to the latest stable version where the vulnerability has been patched.
What impact does CVE-2025-22010 have on system performance?
CVE-2025-22010 can lead to performance degradation due to soft lockups when handling large buffer memory allocations.
Which versions of the Linux kernel are affected by CVE-2025-22010?
CVE-2025-22010 affects specific versions of the Linux kernel that handle RDMA/hns driver operations.
Is CVE-2025-22010 a remote exploitation vulnerability?
No, CVE-2025-22010 does not present a remote exploitation vector but can affect local system performance during heavy memory operations.