# CVE-2024-38582: nilfs2: fix potential hang in nilfs\_detach\_log\_writer()

- Priority: **Routine**
- Reason: Not severe (CVSS 5.3, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2024-06-19 · Modified: 2026-05-23
- Aliases: UBUNTU-CVE-2024-38582, DEBIAN-CVE-2024-38582
- Record: https://cvemate.com/vulnerability/CVE-2024-38582 · JSON: https://cvemate.com/vulnerability/CVE-2024-38582/json

## Description

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

nilfs2: fix potential hang in nilfs_detach_log_writer()

Syzbot has reported a potential hang in nilfs_detach_log_writer() called
during nilfs2 unmount.

Analysis revealed that this is because nilfs_segctor_sync(), which
synchronizes with the log writer thread, can be called after
nilfs_segctor_destroy() terminates that thread, as shown in the call trace
below:

nilfs_detach_log_writer
  nilfs_segctor_destroy
    nilfs_segctor_kill_thread  --> Shut down log writer thread
    flush_work
      nilfs_iput_work_func
        nilfs_dispose_list
          iput
            nilfs_evict_inode
              nilfs_transaction_commit
                nilfs_construct_segment (if inode needs sync)
                  nilfs_segctor_sync  --> Attempt to synchronize with
                                          log writer thread
                           *** DEADLOCK ***

Fix this issue by changing nilfs_segctor_sync() so that the log writer
thread returns normally without synchronizing after it terminates, and by
forcing tasks that are already waiting to complete once after the thread
terminates.

The skipped inode metadata flushout will then be processed together in the
subsequent cleanup work in nilfs_segctor_destroy().
```

## Signals

- CVSS: 5.3 medium (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
- EPSS: 0.861%, percentile 59.79%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 133)

- debian linux (Debian): \< 6.1.94-1 \| \< 6.8.12-1
- ubuntu linux (Ubuntu): All versions (No fix recorded) \| \< 5.4.0-192.212 \| \< 5.15.0-121.131 \| \< 6.8.0-40.40
- ubuntu linux-allwinner-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws (Ubuntu): All versions (No fix recorded) \| \< 5.4.0-1130.140 \| \< 5.15.0-1069.75 \| \< 6.8.0-1013.14
- ubuntu linux-aws-5.0 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.15 (Ubuntu): \< 5.15.0-1069.75~20.04.1
- ubuntu linux-aws-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.3 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.4 (Ubuntu): \< 5.4.0-1130.140~18.04.1
- ubuntu linux-aws-5.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.2 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.5 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.8 (Ubuntu): \< 6.8.0-1013.14~22.04.1
- ubuntu linux-aws-fips (Ubuntu): All versions (No fix recorded) \| \< 5.4.0-1130.140+fips1 \| \< 5.15.0-1069.75+fips1
- ubuntu linux-aws-hwe (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure (Ubuntu): All versions (No fix recorded) \| \< 5.4.0-1135.142 \| \< 5.15.0-1072.81 \| \< 6.8.0-1012.14
- ubuntu linux-azure-4.15 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.11 (Ubuntu): All versions (No fix recorded)

## References (first 20 of 31)

- <https://git.kernel.org/stable/c/911d38be151921a5d152bb55e81fd752384c6830>
- <https://git.kernel.org/stable/c/bc9cee50a4a4ca23bdc49f75ea8242d8a2193b3b>
- <https://git.kernel.org/stable/c/eff7cdf890b02596b8d73e910bdbdd489175dbdb>
- <https://git.kernel.org/stable/c/06afce714d87c7cd1dcfccbcd800c5c5d2cf1cfd>
- <https://git.kernel.org/stable/c/1c3844c5f4eac043954ebf6403fa9fd1f0e9c1c0>
- <https://git.kernel.org/stable/c/a8799662fed1f8747edae87a1937549288baca6a>
- <https://git.kernel.org/stable/c/6e5c8e8e024e147b834f56f2115aad241433679b>
- <https://git.kernel.org/stable/c/c516db6ab9eabbedbc430b4f93b0d8728e9b427f>
- <https://git.kernel.org/stable/c/eb85dace897c5986bc2f36b3c783c6abb8a4292e>
- <https://lists.debian.org/debian-lts-announce/2024/06/msg00020.html>
- <https://ubuntu.com/security/CVE-2024-38582>
- <https://www.cve.org/CVERecord?id=CVE-2024-38582>
- <https://git.kernel.org/linus/eb85dace897c5986bc2f36b3c783c6abb8a4292e>
- <https://ubuntu.com/security/notices/USN-6949-1>
- <https://ubuntu.com/security/notices/USN-6951-1>
- <https://ubuntu.com/security/notices/USN-6952-1>
- <https://ubuntu.com/security/notices/USN-6953-1>
- <https://ubuntu.com/security/notices/USN-6955-1>
- <https://ubuntu.com/security/notices/USN-6949-2>
- <https://ubuntu.com/security/notices/USN-6952-2>

---

Data as of 2026-12-05T05:11:09.725Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
