CVE-2025-37980

block: fix resource leak in blk_register_queue() error path

Published May 20, 2025 CVSS 3.1 · 5.5 Medium EPSS < 1% KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

block: fix resource leak in blk_register_queue() error path

When registering a queue fails after blk_mq_sysfs_register() is
successful but the function later encounters an error, we need
to clean up the blk_mq_sysfs resources.

Add the missing blk_mq_sysfs_unregister() call in the error path
to properly clean up these resources and prevent a memory leak.

Analysis

AI-generated

Technical impact

The vulnerability is a resource leak in the Linux kernel’s blk_register_queue error path. When a block queue registration succeeds through blk_mq_sysfs_register() but a later error occurs, the previously created sysfs resources are not removed, causing kernel memory to be consumed over time. This is a classic example of CWE-401 Unreleased Resource. The leak may allow an attacker to trigger repeated errors and eventually exhaust kernel memory, leading to a denial of service. The likely attack vector is any code path that registers block queues in the kernel, such as a custom block driver. The description states the missing cleanup, and it is inferred that repeated exploitation would accumulate unreleased memory until exhaustion.

Affected Systems

All Linux kernel builds prior to the fix, notably the 6.15 release candidates 1 and 2 and any earlier releases, are affected. Updating to a kernel version that includes commit 40f2eb9b5315 resolves the issue.

Risk and Exploitability

The CVSS score of 5.5 indicates moderate impact. The EPSS score of less than 1% suggests low probability of exploitation in the wild. The vulnerability is not listed in CISA’s KEV catalog. The error path requires the ability to invoke blk_register_queue, which normally necessitates privileged kernel code or a custom module; therefore a local attacker with elevated privileges or an existing module could exploit it. No publicly known exploit is available. Based on the description, it is inferred that a local privileged attacker could repeatedly trigger the error path to exhaust kernel memory and cause a denial of service.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply a kernel update that includes the blk_register_queue resource leak fix (commit 40f2eb9b5315) to run a patched Linux kernel version, such as any release after the patch.
  • If a kernel update is not immediately available, avoid loading custom block drivers that call blk_register_queue until the fix is applied, or isolate such drivers in a restricted environment to limit the potential impact.
  • Configure system monitoring to detect abnormal kernel memory usage and set alerts to prompt administrators to apply the patch promptly.

Generated by OpenCVE AI on April 21, 2026 at 20:42 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4561-1 linux-6.1 security update
Debian DSA Debian DSA DSA-6243-1 linux security update
EUVD EUVD EUVD-2025-15882 In the Linux kernel, the following vulnerability has been resolved: block: fix resource leak in blk_register_queue() error path When registering a queue fails after blk_mq_sysfs_register() is successful but the function later encounters an error, we need to clean up the blk_mq_sysfs resources. Add the missing blk_mq_sysfs_unregister() call in the error path to properly clean up these resources and prevent a memory leak.
Ubuntu USN Ubuntu USN USN-7594-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7594-2 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-7594-3 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8028-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8028-2 Linux kernel (Real-time) vulnerabilities
Ubuntu USN Ubuntu USN USN-8031-1 Linux kernel (GCP) vulnerabilities
Ubuntu USN Ubuntu USN USN-8028-3 Linux kernel (Real-time) vulnerabilities
Ubuntu USN Ubuntu USN USN-8028-4 Linux kernel (FIPS) vulnerabilities
Ubuntu USN Ubuntu USN USN-8028-5 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8031-2 Linux kernel (GCP FIPS) vulnerabilities
Ubuntu USN Ubuntu USN USN-8028-6 Linux kernel (HWE) vulnerabilities
Ubuntu USN Ubuntu USN USN-8031-3 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8052-1 Linux kernel (Low Latency) vulnerabilities
Ubuntu USN Ubuntu USN USN-8028-7 Linux kernel (Low Latency NVIDIA) vulnerabilities
Ubuntu USN Ubuntu USN USN-8028-8 Linux kernel (IBM) vulnerabilities
Ubuntu USN Ubuntu USN USN-8052-2 Linux kernel (Xilinx) vulnerabilities
Ubuntu USN Ubuntu USN USN-8074-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-8074-2 Linux kernel (Azure FIPS) vulnerabilities
Ubuntu USN Ubuntu USN USN-8126-1 Linux kernel (Azure) vulnerabilities
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Weaknesses CWE-401
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.15:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.15:rc2:*:*:*:*:*:*
Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

{'score': 5.5, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Low

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: block: fix resource leak in blk_register_queue() error path When registering a queue fails after blk_mq_sysfs_register() is successful but the function later encounters an error, we need to clean up the blk_mq_sysfs resources. Add the missing blk_mq_sysfs_unregister() call in the error path to properly clean up these resources and prevent a memory leak.
Title block: fix resource leak in blk_register_queue() error path
References
Weaknesses
  • CWE-401

    Missing Release of Memory after Effective Lifetime

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 10, 2026, 12:36 PM
Reserved
Apr 16, 2025, 4:51 AM
Status
Modified
Published
May 20, 2025, 5:15 PM
Modified
Nov 10, 2026, 1:17 PM
Severity
Low
Public date
May 20, 2025, 12:00 AM