CVE-2026-31598
ocfs2: fix possible deadlock between unlink and dio_end_io_write
Check your servers for CVE-2026-31598
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-31598 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
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.
Severity (CVSS)
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Attack vector
- network: an attacker can reach the vulnerable part over the network, often from the internet
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- none: the attacker does not need an account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality none, integrity none, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 0.45%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 41.0% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 16 Oct 2026):
- Exploitation
- none: CISA did not find evidence of exploitation or a public proof of concept
- Automatable
- yes: an attacker can automate the attack across many targets
- Technical impact
- partial: limited control or limited data
Weakness
- CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from a86a72a4a4e0ec109a98e2737948864ed6794bf7, before 297d8d7bb6a2bf133d3a3636edbdf94101cbd719 affected from a86a72a4a4e0ec109a98e2737948864ed6794bf7, before 32630dee18c6bb2175c8a865a474749492eaf19c affected from a86a72a4a4e0ec109a98e2737948864ed6794bf7, before 93f35419eb84d58820040642cb6e7528fe4aba7a affected from a86a72a4a4e0ec109a98e2737948864ed6794bf7, before 4b80b5a838a32437f2cae0662578bac216a2c51a affected from a86a72a4a4e0ec109a98e2737948864ed6794bf7, before 2b884d52273c60c298bd570163e8053657bbaff6 affected from a86a72a4a4e0ec109a98e2737948864ed6794bf7, before bc0fb5c7d54c78be43a536df0e20dee32adb27d3 affected from a86a72a4a4e0ec109a98e2737948864ed6794bf7, before f9fb1a7b635849322e1d7b7b6b26389778ec8e82 affected from a86a72a4a4e0ec109a98e2737948864ed6794bf7, before e049f7a9bd80b7319590789ea5e1c523d6339d91 affected from a86a72a4a4e0ec109a98e2737948864ed6794bf7, before b02da26a992db0c0e2559acbda0fc48d4a2fd337
Other versions: unaffected
|
| Linux |
affected 4.6 unaffected before 4.6 unaffected from 5.10.258 up to and including 5.10.* unaffected from 5.15.209 up to and including 5.15.* unaffected from 6.1.175 up to and including 6.1.* unaffected from 6.6.136 up to and including 6.6.* unaffected from 6.12.83 up to and including 6.12.* unaffected from 6.18.24 up to and including 6.18.* unaffected from 6.19.14 up to and including 6.19.* unaffected from 7.0.1 up to and including 7.0.* unaffected 7.1 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2026-31598 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2026-31598
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2026-31598
trivy image --scanners vuln IMAGE | grep CVE-2026-31598
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/297d8d7bb6a2bf133d3a3636edbdf94101cbd719 git.kernel.org
- https://git.kernel.org/stable/c/32630dee18c6bb2175c8a865a474749492eaf19c git.kernel.org
- https://git.kernel.org/stable/c/93f35419eb84d58820040642cb6e7528fe4aba7a git.kernel.org
- https://git.kernel.org/stable/c/4b80b5a838a32437f2cae0662578bac216a2c51a git.kernel.org
- https://git.kernel.org/stable/c/2b884d52273c60c298bd570163e8053657bbaff6 git.kernel.org
- https://git.kernel.org/stable/c/bc0fb5c7d54c78be43a536df0e20dee32adb27d3 git.kernel.org
- https://git.kernel.org/stable/c/f9fb1a7b635849322e1d7b7b6b26389778ec8e82 git.kernel.org
- https://git.kernel.org/stable/c/e049f7a9bd80b7319590789ea5e1c523d6339d91 git.kernel.org
- https://git.kernel.org/stable/c/b02da26a992db0c0e2559acbda0fc48d4a2fd337 git.kernel.org
Source: the record CVE-2026-31598 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse