5.3medium
nilfs2: fix potential hang in nilfs_detach_log_writer()
- Severity
- 5.3medium CVSS:3.1 by CISA-ADP
- Exploit likelihood
- 0.86% (higher than 59% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- Linux
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
| Product or package | Versions | Reported by |
|---|---|---|
| Linux Linux | from 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52 before 911d38be151921a5d152bb55e81fd752384c6830, from 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52 before bc9cee50a4a4ca23bdc49f75ea8242d8a2193b3b, from 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52 before eff7cdf890b02596b8d73e910bdbdd489175dbdb, from 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52 before 06afce714d87c7cd1dcfccbcd800c5c5d2cf1cfd, from 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52 before 1c3844c5f4eac043954ebf6403fa9fd1f0e9c1c0, from 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52 before a8799662fed1f8747edae87a1937549288baca6a, from 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52 before 6e5c8e8e024e147b834f56f2115aad241433679b, from 7ef3ff2fea8bf5e4a21cef47ad87710a3d0fdb52 before c516db6ab9eabbedbc430b4f93b0d8728e9b427f and 14 more Not affected: before 3.19, from 4.19.316 up to 4.19.*, from 5.4.278 up to 5.4.*, from 5.10.219 up to 5.10.*, from 5.15.161 up to 5.15.*, from 6.1.93 up to 6.1.* | CVE List |
| linux linux_kernel | before 4.19.316, from 4.20 before 5.4.278, from 5.5 before 5.10.219, from 5.11 before 5.15.161, from 5.16 before 6.1.93, from 6.2 before 6.6.33, from 6.7 before 6.8.12, from 6.9 before 6.9.3 | NVD |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
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().
NVD (es)
En el kernel de Linux, se resolvió la siguiente vulnerabilidad: nilfs2: soluciona un posible bloqueo en nilfs_detach_log_writer() Syzbot ha informado de un posible bloqueo en nilfs_detach_log_writer() llamado durante el desmontaje de nilfs2. El análisis reveló que esto se debe a que nilfs_segctor_sync(), que se sincroniza con el hilo del escritor de registros, puede ser llamado después de que nilfs_segctor_destroy() finalice ese hilo, como se muestra en el seguimiento de llamadas a continuación: nilfs_detach_log_writer nilfs_segctor_destroy nilfs_segctor_kill_thread --> Apagar el hilo del escritor de registros Flush_work nilfs_iput_work_func nilfs_dispose_list iput nilfs_evict_inode nilfs_transaction_commit nilfs_construct_segment (si el inodo necesita sincronización) nilfs_segctor_sync --> Intente sincronizar con el hilo del escritor de registros *** DEADLOCK *** Solucione este problema cambiando nilfs_segctor_sync() para que el hilo del escritor de registros regrese normalmente sin sincronizarse después de que termine y forzando las tareas que ya están esperando a completarse una vez que finaliza el hilo. La eliminación de metadatos del inodo omitido se procesará en conjunto en el trabajo de limpieza posterior en nilfs_segctor_destroy().
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-38582 changed 2026-05-23 | CVE Terms of Use |
| NVD | CVE-2024-38582 changed 2026-06-17 | Public domain |