CVE-2026-31580·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: bcache: fix cached_dev.sb_bio use-after-free and crash In our production environment, we have received multiple crash reports regarding libceph, which have caught our attention: ``` [6888366.280350] Call Trace: [6888366.280452] blk_update_request+0x14e/0x370 [6888366.280561] blk_mq_end_request+0x1a/0x130 [6888366.280671] rbd_img_handle_request+0x1a0/0x1b0 [rbd] [6888366.280792] rbd_obj_handle_request+0x32/0x40 [rbd] [6888366.280903] __complete_request+0x22/0x70 [libceph] [6888366.281032] osd_dispatch+0x15e/0xb40 [libceph] [6888366.281164] ? inet_recvmsg+0x5b/0xd0 [6888366.281272] ? ceph_tcp_recvmsg+0x6f/0xa0 [libceph] [6888366.281405] ceph_con_process_message+0x79/0x140 [libceph] [6888366.281534] ceph_con_v1_try_read+0x5d7/0xf30 [libceph] [6888366.281661] ceph_con_workfn+0x329/0x680 [libceph] ``` After analyzing the coredump file, we found that the address of dc->sb_bio has been freed. We know that cached_dev is only freed when it is stopped. Since sb_bio is a part of struct cached_dev, rather than an alloc every time. If the device is stopped while writing to the superblock, the released address will be accessed at endio. This patch hopes to wait for sb_write to complete in cached_dev_free. It should be noted that we analyzed the cause of the problem, then tell all details to the QWEN and adopted the modifications it made.
- Severity
- high
- Software
- Kernel
- Fixed in
- 7.0.1
- Published
How likely is exploitation
FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at 0.13% — higher than 2% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.
Read the two together. CVE-2026-31580 scores 7.8 on CVSS, so a successful attack would be serious — but at 0.13%, almost nobody is currently attempting it. That is a different situation from a flaw under mass exploitation, and it is usually the difference between patching on your next maintenance window and patching tonight.
Affected versions
From: 7.0
Until: 7.0.1
Fixed in: 7.0.1
How to fix this CVE
Update your Linux kernel to version 7.0.1 or later to resolve a use-after-free vulnerability in the bcache subsystem that can cause kernel crashes during superblock write operations. This issue occurs when a cached device is stopped while superblock data is being written, leading to access of freed memory at I/O completion. Apply the fix immediately on systems using bcache for storage caching to prevent unexpected system failures and data corruption.
sudo dnf check-update kernel && sudo dnf update kernelDefensia detects this vulnerability
How to check if you are affected
- Check your current kernel version: uname -r
- Verify if bcache is enabled: lsblk -f | grep bcache or cat /proc/devices | grep bcache
- Review kernel logs for bcache-related crashes: sudo dmesg | grep -i 'bcache\|use-after-free\|blk_update_request'
- Confirm the fix was applied by verifying kernel version is 7.0.1+: uname -r
FAQ
What is CVE-2026-31580?
CVE-2026-31580 is a use-after-free vulnerability in the Linux kernel's bcache (block device caching layer) where the sb_bio structure is freed while superblock write operations are still pending, causing a crash when the I/O completion handler attempts to access the freed memory.
Is CVE-2026-31580 being actively exploited?
No, there is no evidence that CVE-2026-31580 is being actively exploited in the wild or included in any public exploit databases.
What versions of Kernel are affected by CVE-2026-31580?
Linux kernel versions 7.0 through 7.0.0 are affected; the vulnerability is fixed in kernel 7.0.1 and later versions.
How do I check if my server is vulnerable to CVE-2026-31580?
Run 'uname -r' to check your kernel version. If it shows 7.0 or 7.0.0, you are vulnerable. Additionally, confirm bcache is in use with 'lsblk -f | grep bcache' or 'cat /proc/devices | grep bcache'.
Does Defensia detect CVE-2026-31580?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Linux kernel is installed on a monitored server, CVE-2026-31580 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/2d6965581e164fa2ba3f7652ddae5535f6336576
- https://git.kernel.org/stable/c/383f7fec0de8cee1cf7ae1f9d9f14044a61f10f9
- https://git.kernel.org/stable/c/47fa09fe7f3e09df28a51cb2cbd8f5d2f7f6edc1
- https://git.kernel.org/stable/c/4f71c8ba2dc009042493021d94a9718fbe2ebf27
- https://git.kernel.org/stable/c/81f44ed8c3f54abb7561ece774ea4cca5070b2f2
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-31580. Free for 1 server.
Get started free