CVE-2024-38582

nilfs2: fix potential hang in nilfs_detach_log_writer()

State
Published
Severity
5.3 Medium
Published
Jun 19, 2024
Updated
May 23, 2026
Reserved
Jun 18, 2024

Read the record on cve.org

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

Scores

CVSSScoreVectorSource
3.15.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:LCISA-ADP

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52 to before 911d38be151921a5d152bb55e81fd752384c6830Affected
  • 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52 to before bc9cee50a4a4ca23bdc49f75ea8242d8a2193b3bAffected
  • 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52 to before eff7cdf890b02596b8d73e910bdbdd489175dbdbAffected
  • 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52 to before 06afce714d87c7cd1dcfccbcd800c5c5d2cf1cfdAffected
  • 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52 to before 1c3844c5f4eac043954ebf6403fa9fd1f0e9c1c0Affected
  • 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52 to before a8799662fed1f8747edae87a1937549288baca6aAffected
  • 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52 to before 6e5c8e8e024e147b834f56f2115aad241433679bAffected
  • 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52 to before c516db6ab9eabbedbc430b4f93b0d8728e9b427fAffected
  • 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52 to before eb85dace897c5986bc2f36b3c783c6abb8a4292eAffected
  • c23f3a9fa7826af0465b9408b186f6b555991890Affected
  • 28cd54f27d309bd65db8ff4b8e6275345287484cAffected
  • ec7cae16b37ab478d6d7e33e8563b24ca189e6cfAffected
  • d26f2dfa556323787ee1ebd5d03aeaa8650c7404Affected
  • 52e87609d9d3ea34cadb5676e8ea85d025ac9632Affected
  • 7bb9e4a06e12583f1418b669dc45bb3ee84496c6Affected
  • 3.2.68 to before 3.3Affected
  • 3.4.107 to before 3.5Affected
  • 3.10.69 to before 3.11Affected
  • 3.12.38 to before 3.13Affected
  • 3.14.33 to before 3.15Affected
  • 3.18.7 to before 3.19Affected
LinuxLinux
  • 3.19Affected
  • before 3.19Not affected
  • 4.19.316 through 4.19.*Not affected
  • 5.4.278 through 5.4.*Not affected
  • 5.10.219 through 5.10.*Not affected
  • 5.15.161 through 5.15.*Not affected
  • 6.1.93 through 6.1.*Not affected
  • 6.6.33 through 6.6.*Not affected
  • 6.8.12 through 6.8.*Not affected
  • 6.9.3 through 6.9.*Not affected
  • 6.10 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.