CVE-2025-40125
Description
An error handling oversight was found in the Linux kernel's block multiqueue subsystem when managing hardware queue sysfs entries. A local user can trigger this issue when sysfs registration fails for hardware queues but later operations attempt to unregister them. Since the unregistration code doesn't verify whether sysfs creation succeeded, it tries to delete nonexistent kobject entries, causing kernfs warnings and potential system instability or denial of service.
Statement
Block devices with multiple hardware queues create sysfs entries for each queue. The __blk_mq_update_nr_hw_queues function calls blk_mq_sysfs_register_hctxs without checking its return value. If sysfs creation fails for some queues, those kobjects never get added to sysfs. Later, when changing queue counts or removing the disk, blk_mq_unregister_hctx unconditionally calls kobject_del on all queues. For queues where sysfs creation failed, this tries to remove entries that don't exist, triggering kernfs errors. The fix checks state_in_sysfs before attempting deletion, skipping kobjects that were never successfully added to sysfs.
Common Vulnerability Scoring System (CVSS) Score Details
Info alert:Important note
CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).
The following CVSS metrics and score provided are preliminary and subject to review.
CVSS v3 Score Breakdown
| Red Hat | NVD | cve.org | |
|---|---|---|---|
| Base Score | 5.5 | N/A | N/A |
| Attack Vector | Local | N/A | N/A |
| Attack Complexity | Low | N/A | N/A |
| Privileges Required | Low | N/A | N/A |
| User Interaction | None | N/A | N/A |
| Scope | Unchanged | N/A | N/A |
| Confidentiality | None | N/A | N/A |
| Integrity Impact | None | N/A | N/A |
| Availability Impact | High | N/A | N/A |
Vector
Red Hat: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Understanding the Weakness (CWE)
Availability,Integrity
Technical Impact: Unexpected State; DoS: Crash, Exit, or Restart
An unexpected return value could place the system in a state that could lead to a crash or other unintended behaviors.
Frequently Asked Questions
Not sure what something means? Check out our Security Glossary.
Want to get errata notifications? Sign up here.