CVE-2026-138983: nilfs2: fix deadlock between nilfs_evict_inode() and find_inode()

Published Nov 30, 2026
·
Updated

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

nilfs2: fix deadlock between nilfsevictinode() and findinode()

Syzbot reported a deadlock between nilfsevictinode(), executed via an asynchronous workqueue (kworker) as:

processonework() processscheduledworks() nilfsiputworkfunc() nilfsdisposelist() iput() iputfinal() evict() sop->evictinode() nilfsevictinode()

and findinode(), called via

nilfsmkdir() nilfsnewinode() nilfsinsertinodelocked() insertinodelocked4() inodeinsert5() findinode()

When an inode is deleted (inlink == 0), nilfsevictinode() clears its ifile bitmap entry and then synchronously triggers the log writer via nilfstransactioncommit() if ISSYNC(inode) is true.

If a concurrent directory creation via nilfsnewinode() attempts to allocate the same newly freed inode number, however, findinode() called just before inserting it into the inode hash, blocks waiting for the old inode's evict() to complete.

Meanwhile, the synchronous log writer invoked from nilfsevictinode() tries to acquire a write lock on 'nssegctorsem' which is read locked by the caller of nilfsnewinode() (in this case, nilfsmkdir()), resulting in a deadlock.

The synchronous log writer invocation from nilfsevictinode() is a legacy artifact; it is no longer necessary because the call itself (triggered by iput()) is now handled asynchronously with a kworker if inlink == 0. It merely increases the risk of deadlock.

Fix this deadlock by removing the synchronous log writer trigger from nilfsevictinode().

Affected Software

18 affected componentsFixes available
Linux Linux kernel
linux/kernel>=3.2.68<3.3
3.3
linux/kernel>=3.4.107<3.5
3.5
linux/kernel>=3.10.69<3.11
3.11
linux/kernel>=3.12.38<3.13
3.13
linux/kernel>=3.14.33<3.15
3.15
linux/kernel>=3.18.7<3.19
3.19
linux/kernel>=3.19.0<5.10.275
5.10.275
linux/kernel>=5.11.0<5.15.226
5.15.226
linux/kernel>=5.16.0<6.1.193
6.1.193
linux/kernel>=6.2.0<6.6.163
6.6.163
linux/kernel>=6.7.0<6.12.117
6.12.117
linux/kernel>=6.13.0<6.18.63
6.18.63
linux/kernel>=6.19.0<7.3.4
7.3.4
debian/linux*
debian/linux<6.12.117-1
6.12.117-1
debian/linux<7.3.4-1
7.3.4-1
debian/linux<=6.1.176-1, <=6.1.192-3
6.12.117-17.3.4-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 3.3
  2. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 3.5
  3. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 3.11
  4. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 3.13
  5. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 3.15
  6. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 3.19
  7. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 5.10.275
  8. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 5.15.226
  9. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.1.193
  10. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.6.163
  11. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.12.117
  12. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.18.63
  13. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 7.3.4
  14. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.12.117-1
  15. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 7.3.4-1
  16. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.12.117-1Fixed in 7.3.4-1

Event History

Nov 30, 2026
CVE Published
via MITRE·01:26 PM
Data Sourced
via MITRE·01:26 PM
Description
Data Sourced
via OSV·01:26 PM
DescriptionAffected Software
Data Sourced
via NVD·02:18 PM
Description

Frequently Asked Questions

1

What conditions are required to trigger the deadlock?

An inode with zero links must be evicted while a concurrent directory creation allocates the same newly freed inode number. The evicted inode must also be synchronous (IS_SYNC(inode) is true), causing eviction to synchronously invoke the log writer.

2

Why does the concurrent directory creation cause the system to stall?

The directory-creation path holds a read lock on ns_segctor_sem while find_inode() waits for eviction of the old inode to finish. Eviction’s synchronous log writer then needs the write lock on that same semaphore, so neither path can proceed.

3

Which filesystem operations are involved in the reported scenario?

The reported sequence involves asynchronous inode disposal and eviction through the nilfs2 workqueue, alongside nilfs_mkdir() creating a directory and allocating an inode. The issue is specific to the interaction between inode reuse, eviction, and synchronous log writing in nilfs2.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203