{
  "public_date" : "2026-04-24T00:00:00Z",
  "bugzilla" : {
    "description" : "kernel: ocfs2: fix possible deadlock between unlink and dio_end_io_write",
    "id" : "2461441",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2461441"
  },
  "cwe" : "CWE-833",
  "details" : [ "In the Linux kernel, the following vulnerability has been resolved:\nocfs2: fix possible deadlock between unlink and dio_end_io_write\nocfs2_unlink takes orphan dir inode_lock first and then ip_alloc_sem,\nwhile in ocfs2_dio_end_io_write, it acquires these locks in reverse order.\nThis creates an ABBA lock ordering violation on lock classes\nocfs2_sysfile_lock_key[ORPHAN_DIR_SYSTEM_INODE] and\nocfs2_file_ip_alloc_sem_key.\nLock Chain #0 (orphan dir inode_lock -> ip_alloc_sem):\nocfs2_unlink\nocfs2_prepare_orphan_dir\nocfs2_lookup_lock_orphan_dir\ninode_lock(orphan_dir_inode) <- lock A\n__ocfs2_prepare_orphan_dir\nocfs2_prepare_dir_for_insert\nocfs2_extend_dir\nocfs2_expand_inline_dir\ndown_write(&oi->ip_alloc_sem) <- Lock B\nLock Chain #1 (ip_alloc_sem -> orphan dir inode_lock):\nocfs2_dio_end_io_write\ndown_write(&oi->ip_alloc_sem) <- Lock B\nocfs2_del_inode_from_orphan()\ninode_lock(orphan_dir_inode) <- Lock A\nDeadlock Scenario:\nCPU0 (unlink)                     CPU1 (dio_end_io_write)\n------                            ------\ninode_lock(orphan_dir_inode)\ndown_write(ip_alloc_sem)\ndown_write(ip_alloc_sem)\ninode_lock(orphan_dir_inode)\nSince ip_alloc_sem is to protect allocation changes, which is unrelated\nwith operations in ocfs2_del_inode_from_orphan.  So move\nocfs2_del_inode_from_orphan out of ip_alloc_sem to fix the deadlock.", "A flaw was found in the ocfs2 file system within the Linux kernel. A local user could potentially trigger a deadlock due to an ABBA lock ordering violation between the `ocfs2_unlink` and `ocfs2_dio_end_io_write` functions. This race condition, caused by inconsistent lock acquisition order, could lead to a system hang, resulting in a Denial of Service (DoS)." ],
  "package_state" : [ {
    "product_name" : "Red Hat Enterprise Linux 10",
    "fix_state" : "Not affected",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:10"
  }, {
    "product_name" : "Red Hat Enterprise Linux 6",
    "fix_state" : "Not affected",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:6"
  }, {
    "product_name" : "Red Hat Enterprise Linux 7",
    "fix_state" : "Not affected",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:7"
  }, {
    "product_name" : "Red Hat Enterprise Linux 7",
    "fix_state" : "Not affected",
    "package_name" : "kernel-rt",
    "cpe" : "cpe:/o:redhat:enterprise_linux:7"
  }, {
    "product_name" : "Red Hat Enterprise Linux 8",
    "fix_state" : "Not affected",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:8"
  }, {
    "product_name" : "Red Hat Enterprise Linux 8",
    "fix_state" : "Not affected",
    "package_name" : "kernel-rt",
    "cpe" : "cpe:/o:redhat:enterprise_linux:8"
  }, {
    "product_name" : "Red Hat Enterprise Linux 9",
    "fix_state" : "Not affected",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:9"
  }, {
    "product_name" : "Red Hat Enterprise Linux 9",
    "fix_state" : "Not affected",
    "package_name" : "kernel-rt",
    "cpe" : "cpe:/o:redhat:enterprise_linux:9"
  } ],
  "references" : [ "https://www.cve.org/CVERecord?id=CVE-2026-31598\nhttps://nvd.nist.gov/vuln/detail/CVE-2026-31598\nhttps://lore.kernel.org/linux-cve-announce/2026042417-CVE-2026-31598-6408@gregkh/T" ],
  "name" : "CVE-2026-31598",
  "csaw" : false
}