CVE-2026-31598
HighIn 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.
CVSS 3.1 score
7.5
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness type
CWE-667CVE-2026-31598 is a Improper Locking vulnerability
What is Improper Locking?
The product does not properly acquire or release a lock, which can lead to unexpected behaviour. Learn more on MITRE CWE
Affected versions
Linux kernel versions
4.6
and later are affected. Fixed in
5.10.258,
5.15.209,
6.1.175,
6.6.136,
6.12.83,
6.18.24,
6.19.14,
7.0.1,
7.1-rc1
and their respective stable series.
References
The following references provide additional information about CVE-2026-31598 including vendor advisories, patch commits, exploit details, and third-party analysis. Links are sourced from the NIST NVD database.
-
PatchKernel patch commithttps://git.kernel.org/stable/c/297d8d7bb6a2bf133d3a3636edbdf94101cbd719
-
PatchKernel patch commithttps://git.kernel.org/stable/c/2b884d52273c60c298bd570163e8053657bbaff6
-
PatchKernel patch commithttps://git.kernel.org/stable/c/32630dee18c6bb2175c8a865a474749492eaf19c
Frequently asked questions
-
What is CVE-2026-31598?
CVE-2026-31598 is a High severity Linux kernel vulnerability with a CVSS score of 7.5 out of 10 , classified as an Improper Locking flaw (CWE-667) . It affects Linux kernel versions from 4.6 onward and has been patched in 5.10.258, 5.15.209, 6.1.175 and others. CVE-2026-31598 has not been confirmed as actively exploited and is not listed in the CISA KEV catalog.
-
What is the CVSS score for CVE-2026-31598?
CVE-2026-31598 has a CVSS score of 7.5 out of 10, rated High severity (CVSS 3.1). The vector string is
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H. -
Is there a patch available for CVE-2026-31598?
Yes — CVE-2026-31598 has been patched. Fixed versions include 5.10.258, 5.15.209, 6.1.175 and others. If you are running Linux kernel 4.6 or later up to the fix versions, apply the relevant patch for your kernel branch.
-
Is CVE-2026-31598 actively exploited?
No — CVE-2026-31598 has not been confirmed as actively exploited. It is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.
-
What is Improper Locking (CWE-667)?
The product does not properly acquire or release a lock, which can lead to unexpected behaviour. View CWE-667 on MITRE CWE →