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 HatNVDcve.org
Base Score5.5N/AN/A
Attack VectorLocalN/AN/A
Attack ComplexityLowN/AN/A
Privileges RequiredLowN/AN/A
User InteractionNoneN/AN/A
ScopeUnchangedN/AN/A
ConfidentialityNoneN/AN/A
Integrity ImpactNoneN/AN/A
Availability ImpactHighN/AN/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

Want to get errata notifications? Sign up here.