CVE-2026-31598
ocfs2: fix possible deadlock between unlink and dio_end_io_write
Reported by linux · Published April 24, 2026
In the Linux kernel, the following vulnerability has been resolved: ocfs2: fix possible deadlock between unlink and dio_end_io_write ocfs2_unlink takes orphan dir inode_lock first and then ip_alloc_sem, while in ocfs2_dio_end_io_write, it acquires these locks in reverse order. This creates an ABBA lock ordering violation on lock classes ocfs2_sysfile_lock_key[ORPHAN_DIR_SYSTEM_INODE] and ocfs2_file_ip_alloc_sem_key. Lock Chain #0 (orphan dir inode_lock -> ip_alloc_sem): ocfs2_unlink ocfs2_prepare_orphan_dir ocfs2_lookup_lock_orphan_dir inode_lock(orphan_dir_inode) <- lock A __ocfs2_prepare_orphan_dir ocfs2_prepare_dir_for_insert ocfs2_extend_dir ocfs2_expand_inline_dir down_write(&oi->ip_alloc_sem) <- Lock B Lock Chain #1 (ip_alloc_sem -> orphan dir inode_lock): ocfs2_dio_end_io_write down_write(&oi->ip_alloc_sem) <- Lock B ocfs2_del_inode_from_orphan() inode_lock(orphan_dir_inode) <- Lock A Deadlock Scenario: CPU0 (unlink) CPU1 (dio_end_io_write) ------ ------ inode_lock(orphan_dir_inode) down_write(ip_alloc_sem) down_write(ip_alloc_sem) inode_lock(orphan_dir_inode) Since ip_alloc_sem is to protect allocation changes, which is unrelated with operations in ocfs2_del_inode_from_orphan. So move ocfs2_del_inode_from_orphan out of ip_alloc_sem to fix the deadlock.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| linux-azure-6.18 | Chainguard | 6.18.31-r0 |
| linux-aws-6.12 | Chainguard | 6.12.85-r0 |
| linux-vmware-6.12 | Chainguard | 6.12.85-r0 |
| linux-vmware-6.18 | Chainguard | 6.18.31-r0 |
| linux_kernel | linux | 7.0.1, 6.19.14, 6.18.24, 6.12.83, 6.6.136 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | a86a72a4a4e0ec109a98e2737948864ed6794bf7, a86a72a4a4e0ec109a98e2737948864ed6794bf7, a86a72a4a4e0ec109a98e2737948864ed6794bf7 |
| Linux | Linux | 4.6, 0, 5.10.258 |
| chainguard | linux-azure-6.18 | 0 |
| chainguard | linux-aws-6.12 | 0 |
| chainguard | linux-vmware-6.12 | 0 |
| chainguard | linux-vmware-6.18 | 0 |
| linux | linux_kernel | 4.6, 4.6, 4.6 |
| chainguard | linux-gcp-6.18 | 0 |
| Linux | Linux | 7.1, 5.10.258, 5.15.209 |
| chainguard | linux-aws-6.18 | 0 |
| chainguard | linux-qemu-6.18 | 0 |
| chainguard | linux-qemu-6.12 | 0 |
Timeline
- Apr 24, 2026 CVE Published
- Apr 24, 2026 Security Advisory (103 in total, the first dated here)
- May 18, 2026 EPSS Score (30 in total, the first dated here)
- Jul 18, 2026 Coalition ESS Score
- Aug 11, 2026 Distribution Patch (97 in total, the first dated here)
- Sep 16, 2026 CVE Updated
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2026-31598
vulnetix vdb fixes CVE-2026-31598
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2026-31598/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart