VDB

CVE-2026-31598

CVE-2026-31598 PUBLISHED CVSS 7.5 HIGH

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.

PackageEcosystemFixed in
linux-azure-6.18Chainguard6.18.31-r0
linux-aws-6.12Chainguard6.12.85-r0
linux-vmware-6.12Chainguard6.12.85-r0
linux-vmware-6.18Chainguard6.18.31-r0
linux_kernellinux7.0.1, 6.19.14, 6.18.24, 6.12.83, 6.6.136

Risk scores

CVSS 3.1
7.5
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Affected products

VendorProductVersions
LinuxLinuxa86a72a4a4e0ec109a98e2737948864ed6794bf7, a86a72a4a4e0ec109a98e2737948864ed6794bf7, a86a72a4a4e0ec109a98e2737948864ed6794bf7
LinuxLinux4.6, 0, 5.10.258
chainguardlinux-azure-6.180
chainguardlinux-aws-6.120
chainguardlinux-vmware-6.120
chainguardlinux-vmware-6.180
linuxlinux_kernel4.6, 4.6, 4.6
chainguardlinux-gcp-6.180
LinuxLinux7.1, 5.10.258, 5.15.209
chainguardlinux-aws-6.180
chainguardlinux-qemu-6.180
chainguardlinux-qemu-6.120

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

References

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›