# CVE-2026-46061: jbd2: fix deadlock in jbd2_journal_cancel_revoke()

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.09%, higher than 0% of CVEs (2026-12-01)
- Published: 2026-05-27T12:57:22.041Z
- Modified: 2026-06-17T10:53:00.163Z
- Weaknesses: CWE-667
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

jbd2: fix deadlock in jbd2_journal_cancel_revoke()

Commit f76d4c28a46a ("fs/jbd2: use sleeping version of
__find_get_block()") changed jbd2_journal_cancel_revoke() to use
__find_get_block_nonatomic() which holds the folio lock instead of
i_private_lock. This breaks the lock ordering (folio -> buffer) and
causes an ABBA deadlock when the filesystem blocksize < pagesize:

     T1                                T2
ext4_mkdir()
 ext4_init_new_dir()
  ext4_append()
   ext4_getblk()
    lock_buffer()    <- A
                                   sync_blockdev()
                                    blkdev_writepages()
                                     writeback_iter()
                                      writeback_get_folio()
                                       folio_lock()   <- B
     ext4_journal_get_create_access()
      jbd2_journal_cancel_revoke()
       __find_get_block_nonatomic()
        folio_lock()  <- B
                                     block_write_full_folio()
                                      lock_buffer()   <- A

This can occasionally cause generic/013 to hang.

Fix by only calling __find_get_block_nonatomic() when the passed
buffer_head doesn't belong to the bdev, which is the only case that we
need to look up its bdev alias. Otherwise, the lookup is redundant since
the found buffer_head is equal to the one we passed in.

(As written by CVE List.)

## Affected

- Linux Linux: from f1c5aa614b5c251f93a6a4c8c26001d5e9e53fd6 before dff07cc98fdf6af57a7c054dc09b2050a9d5c287; from f76d4c28a46a9260d85e00dafc8f46d369365d33 before 2b2fee890250ab647a601124471a334bb01a0790; from f76d4c28a46a9260d85e00dafc8f46d369365d33 before bbd943d6a2d566428324b516a37f98328dfb802d; from f76d4c28a46a9260d85e00dafc8f46d369365d33 before 981fcc5674e67158d24d23e841523eccba19d0e7; 1bb7a4b6b3d7dd8da6f5a9d0529d42c22a359e71; from 6.12.31 before 6.12.86; from 6.14.9 before 6.15; 6.15 (not affected: before 6.15; from 6.12.86 up to 6.12.*; from 6.18.27 up to 6.18.*; from 7.0.4 up to 7.0.*; from 7.1 up to *)
- linux linux_kernel: from 6.12.31 before 6.12.86; from 6.14.9 before 6.15; from 6.15.1 before 6.18.27; from 6.19 before 7.0.4; 6.15

## References

- <https://git.kernel.org/stable/c/dff07cc98fdf6af57a7c054dc09b2050a9d5c287> (patch)
- <https://git.kernel.org/stable/c/2b2fee890250ab647a601124471a334bb01a0790> (patch)
- <https://git.kernel.org/stable/c/bbd943d6a2d566428324b516a37f98328dfb802d> (patch)
- <https://git.kernel.org/stable/c/981fcc5674e67158d24d23e841523eccba19d0e7> (patch)

## Sources

- CVE List: [CVE-2026-46061](https://www.cve.org/CVERecord?id=CVE-2026-46061), CVE Terms of Use, modified 2026-06-14
- NVD: [CVE-2026-46061](https://nvd.nist.gov/vuln/detail/CVE-2026-46061), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2026-46061 · Whole record: https://cve.day/CVE-2026-46061.json · Rebuilt by cve.day 2026-11-25T22:59:22.565Z
