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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.3
- **CVSS:** 5.3 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: Low
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 1.11% (percentile 66, 2026-11-26)
- **CWE:** CWE-667
- **Published:** 2024-06-19T13:37:39.163Z
- **Modified:** 2026-06-17T07:40:38.210Z

## Who should check

- Anyone running Linux \>= 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52, \< 911d38be151921a5d152bb55e81fd752384c6830; \>= 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52, \< bc9cee50a4a4ca23bdc49f75ea8242d8a2193b3b; \>= 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52, \< eff7cdf890b02596b8d73e910bdbdd489175dbdb; \>= 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52, \< 06afce714d87c7cd1dcfccbcd800c5c5d2cf1cfd; \>= 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52, \< 1c3844c5f4eac043954ebf6403fa9fd1f0e9c1c0; \>= 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52, \< a8799662fed1f8747edae87a1937549288baca6a; \>= 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52, \< 6e5c8e8e024e147b834f56f2115aad241433679b; \>= 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52, \< c516db6ab9eabbedbc430b4f93b0d8728e9b427f; \>= 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52, \< eb85dace897c5986bc2f36b3c783c6abb8a4292e; c23f3a9fa7826af0465b9408b186f6b555991890; …
- Anyone running Linux 3.19

## Description

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().

## Affected and fixed versions

- Linux: \>= 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52, \< 911d38be151921a5d152bb55e81fd752384c6830; \>= 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52, \< bc9cee50a4a4ca23bdc49f75ea8242d8a2193b3b; \>= 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52, \< eff7cdf890b02596b8d73e910bdbdd489175dbdb; \>= 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52, \< 06afce714d87c7cd1dcfccbcd800c5c5d2cf1cfd; \>= 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52, \< 1c3844c5f4eac043954ebf6403fa9fd1f0e9c1c0; \>= 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52, \< a8799662fed1f8747edae87a1937549288baca6a; \>= 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52, \< 6e5c8e8e024e147b834f56f2115aad241433679b; \>= 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52, \< c516db6ab9eabbedbc430b4f93b0d8728e9b427f; \>= 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52, \< eb85dace897c5986bc2f36b3c783c6abb8a4292e; c23f3a9fa7826af0465b9408b186f6b555991890; … (cvelist)
- Linux: 3.19 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-38582. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-38582.md
Affected: Linux >= 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52, < 911d38be151921a5d152bb55e81fd752384c6830; >= 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52, < bc9cee50a4a4ca23bdc49f75ea8242d8a2193b3b; >= 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52, < eff7cdf890b02596b8d73e910bdbdd489175dbdb; >= 7ef3ff2fea8bf5e4a21cef4…
Fixed in: Linux 911d38be151921a5d152bb55e81fd752384c6830, Linux 06afce714d87c7cd1dcfccbcd800c5c5d2cf1cfd, Linux 1c3844c5f4eac043954ebf6403fa9fd1f0e9c1c0, Linux 6e5c8e8e024e147b834f56f2115aad241433679b

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-38582 being exploited?

There is no confirmed exploitation: CVE-2024-38582 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.11% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-38582?

Medium: CVSS 5.3 (v3.1, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2024-38582?

Linux \>= 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52, \< 911d38be151921a5d152bb55e81fd752384c6830; \>= 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52, \< bc9cee50a4a4ca23bdc49f75ea8242d8a2193b3b; \>= 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52, \< eff7cdf890b02596b8d73e910bdbdd489175dbdb; \>= 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52, \< 06afce714d87c7cd1dcfccbcd800c5c5d2cf1cfd; \>= 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52, \< 1c3844c5f4eac043954ebf6403fa9fd1f0e9c1c0; \>= 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52, \< a8799662fed1f8747edae87a1937549288baca6a; \>= 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52, \< 6e5c8e8e024e147b834f56f2115aad241433679b; \>= 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52, \< c516db6ab9eabbedbc430b4f93b0d8728e9b427f; \>= 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52, \< eb85dace897c5986bc2f36b3c783c6abb8a4292e; c23f3a9fa7826af0465b9408b186f6b555991890; …; Linux 3.19.

### Is there a fix for CVE-2024-38582?

Yes. Fixed in Linux 911d38be151921a5d152bb55e81fd752384c6830, Linux 06afce714d87c7cd1dcfccbcd800c5c5d2cf1cfd, Linux 1c3844c5f4eac043954ebf6403fa9fd1f0e9c1c0, Linux 6e5c8e8e024e147b834f56f2115aad241433679b. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2024-38582?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/911d38be151921a5d152bb55e81fd752384c6830>
- patch: <https://git.kernel.org/stable/c/bc9cee50a4a4ca23bdc49f75ea8242d8a2193b3b>
- patch: <https://git.kernel.org/stable/c/eff7cdf890b02596b8d73e910bdbdd489175dbdb>
- patch: <https://git.kernel.org/stable/c/06afce714d87c7cd1dcfccbcd800c5c5d2cf1cfd>
- patch: <https://git.kernel.org/stable/c/1c3844c5f4eac043954ebf6403fa9fd1f0e9c1c0>
- patch: <https://git.kernel.org/stable/c/a8799662fed1f8747edae87a1937549288baca6a>
- patch: <https://git.kernel.org/stable/c/6e5c8e8e024e147b834f56f2115aad241433679b>
- patch: <https://git.kernel.org/stable/c/c516db6ab9eabbedbc430b4f93b0d8728e9b427f>
- patch: <https://git.kernel.org/stable/c/eb85dace897c5986bc2f36b3c783c6abb8a4292e>
- other: <https://lists.debian.org/debian-lts-announce/2024/06/msg00020.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-38582>

HTML: <https://flawdb.com/CVE-2024-38582> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-38582>
