CVE-2025-40125: Linux kernel · blk-mq: check kobject state_in_sysfs before deleting in blk_mq_unregister_hctx
Affects Linux kernelSource GCVE Database
Not known to be exploited · fixed in 5.15.0-1100.107~20.04.2 : update Linux kernel when convenient.
Data as of 26 Oct 2026, 17:16 UTC
Rated by Threat Radar · No CVSS score from NVD or the CNA
- EPSS
- 0.2% chance of exploitation in 30 days – higher than 13% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 5.15.0-1100.107~20.04.2, 5.15.0-1110.119~20.04.1, 5.15.0-1100.109~20.04.1 +71
Exploitation evidence
Disclosed: evidence found.
CVE published 12 Nov 2025
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.
What to do
Upgrade to a fixed release listed under Affected software.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Ubuntu 25.10linuxpkg:deb/ubuntu/linux?arch=source&distro=questingOther threats | Affected
| Fixed in
|
Ubuntu 25.10linux-awspkg:deb/ubuntu/linux-aws?arch=source&distro=questingOther threats | Affected
| Fixed in
|
Ubuntu 25.10linux-azurepkg:deb/ubuntu/linux-azure?arch=source&distro=questingOther threats | Affected
| Fixed in
|
Ubuntu 25.10linux-azure-fdepkg:deb/ubuntu/linux-azure-fde?arch=source&distro=questingOther threats | Affected
| Fixed in– |
Ubuntu 25.10linux-gcppkg:deb/ubuntu/linux-gcp?arch=source&distro=questingOther threats | Affected
| Fixed in
|
Ubuntu 25.10linux-oraclepkg:deb/ubuntu/linux-oracle?arch=source&distro=questingOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
Description
In the Linux kernel, the following vulnerability has been resolved: blk-mq: check kobject state_in_sysfs before deleting in blk_mq_unregister_hctx In __blk_mq_update_nr_hw_queues() the return value of blk_mq_sysfs_register_hctxs() is not checked. If sysfs creation for hctx fails, later changing the number of hw_queues or removing disk will trigger the following warning: kernfs: can not remove 'nr_tags', no directory WARNING: CPU: 2 PID: 637 at fs/kernfs/dir.c:1707 kernfs_remove_by_name_ns+0x13f/0x160 Call Trace: remove_files.isra.1+0x38/0xb0 sysfs_remove_group+0x4d/0x100 sysfs_remove_groups+0x31/0x60 __kobject_del+0x23/0xf0 kobject_del+0x17/0x40 blk_mq_unregister_hctx+0x5d/0x80 blk_mq_sysfs_unregister_hctxs+0x94/0xd0 blk_mq_update_nr_hw_queues+0x124/0x760 nullb_update_nr_hw_queues+0x71/0xf0 [null_blk] nullb_device_submit_queues_store+0x92/0x120 [null_blk] kobjct_del() was called unconditionally even if sysfs creation failed. Fix it by checkig the kobject creation statusbefore deleting it.
References
- ubuntu.com/security/CVE-2025-40125 (opens in a new tab)
- cve.org/CVERecord?id=CVE-2025-40125 (opens in a new tab)
- git.kernel.org/linus/4c7ef92f6d4d08a27d676e4c348f4e2922cab3ed (opens in a new tab)
- git.kernel.org/stable/c/06c4826b1d900611096e4621e93133db57e13911 (opens in a new tab)
- git.kernel.org/stable/c/4b97e99b87a773d52699521d40864f3ec888e9a6 (opens in a new tab)
- git.kernel.org/stable/c/4c7ef92f6d4d08a27d676e4c348f4e2922cab3ed (opens in a new tab)
- git.kernel.org/stable/c/6e7dadc5763c48eb3b9b91265a21f312599ebb2c (opens in a new tab)
- git.kernel.org/stable/c/a8c53553f1833cc2d14175d2d72cf37193a01898 (opens in a new tab)
- git.kernel.org/stable/c/babc634e9fe2803962dba98a07587e835dbc0731 (opens in a new tab)
- git.kernel.org/stable/c/cc14ea21c4e658814d737ed4dedde6cd626a15ad (opens in a new tab)
- git.kernel.org/stable/c/d5ddd76ee52bdc16e9f8b1e7791291e785dab032 (opens in a new tab)
- ubuntu.com/security/notices/USN-8029-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-8030-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-8033-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-8033-2 (opens in a new tab)
- ubuntu.com/security/notices/USN-8033-3 (opens in a new tab)
- ubuntu.com/security/notices/USN-8034-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-8033-4 (opens in a new tab)
- ubuntu.com/security/notices/USN-8029-2 (opens in a new tab)
- ubuntu.com/security/notices/USN-8033-5 (opens in a new tab)