CVE-2025-40125
BaseFortify
Publication date: 2025-11-12
Last updated on: 2025-11-12
Assigner: kernel.org
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| linux | linux_kernel | * |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-UNKNOWN |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability in the Linux kernel occurs because the return value of blk_mq_sysfs_register_hctxs() is not checked in the function __blk_mq_update_nr_hw_queues(). If the creation of sysfs entries for hardware contexts (hctx) fails, the code later attempts to delete kobjects unconditionally, which can cause warnings and errors related to removing sysfs directories. The fix involves checking the kobject creation status before attempting to delete it, preventing these errors.
How can this vulnerability impact me? :
This vulnerability can cause kernel warnings and errors when the system tries to remove sysfs directories related to block device hardware queues. While it may not directly lead to a security breach, it can cause instability or unexpected behavior in the kernel's block device subsystem, potentially affecting system reliability or performance.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by monitoring the system logs for the specific warning message related to the blk-mq subsystem. Look for the warning: "kernfs: can not remove 'nr_tags', no directory" along with call traces involving blk_mq_unregister_hctx and related functions. You can use commands like `dmesg | grep 'kernfs: can not remove'` or `journalctl -k | grep 'kernfs: can not remove'` to find these warnings in kernel logs.
What immediate steps should I take to mitigate this vulnerability?
Immediate mitigation involves updating the Linux kernel to a version where this vulnerability is fixed, as the issue is resolved by checking the kobject creation status before deleting it in blk_mq_unregister_hctx. Until an update is applied, monitoring for the warning messages and avoiding operations that change the number of hardware queues or remove disks that trigger this condition may reduce the risk of encountering the issue.