Informazioni sul CVE-2024-27031
NFS: Fix nfs_netfs_issue_read() xarray locking for writeback interrupt
CWE ID: N/A
Base Score (CVSS): N/A
CVE: CVE-2024-27031
Descrizione: “NFS: Vulnerability resolved in the Linux kernel: NFS: Fix for `nfs_netfs_issue_read()` to prevent read interrupts. The `nfs_netfs_issue_read()` loop currently doesn’t disable interrupts while iterating through pages in the xarray. This is a potential deadlock scenario. The fix involves using `xa_for_each_range()` which handles iteration with RCU, reducing code complexity. This problem is easily reproduced with the following test: mount -o vers=3,fsc 127.0.0.1:/export /mnt/nfs dd if=/dev/zero of=/mnt/nfs/file1.bin bs=4096 count=1 echo 3 > /proc/sys/vm/drop_caches dd if=/mnt/nfs/file1.bin of=/dev/null umount /mnt/nfs On the console with a lockdep-enabled kernel, a message similar to: ================================ WARNING: inconsistent lock state 6.7.0-lockdbg+ #10 Not tainted ——————————– inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage. test5/1708 [HC0[0]:SC0[0]:HE1:SE1] takes: ffff888127baa598 (&xa->xa_lock#4){+.?.}-{3:3}, at: nfs_netfs_issue_read+0x1b2/0x4b0 [nfs] {IN-SOFTIRQ-W} state was registered at: lock_acquire+0x144/0x380 _raw_spin_lock_irqsave+0x4e/0xa0 __folio_end_writeback+0x17e/0x5c0 folio_end_writeback+0x93/0x1b0 iomap_finish_io_read+0x4b0 [iomap] nfs_start_io_read+0x28/0x90 [nfs] nfs_netfs_readahead+0x323/0x5a0 [nfs] nfs_readahead+0x323/0x5a0 [nfs] read_pages+0xf3/0x5c0 page_cache_ra_unbounded+0x1c8/0x280 stack backtrace: CPU: 6 PID: 1708 Comm: test5 Kdump: loaded Not tainted 6.7.0-lockdbg+ Hardware name: QEMU Standard PC (Q35 + ICH9, 2009) 04/01/2014 Call Trace: dump_stack_lvl+0x5b/0x90 mark_lock+0xb3f/0xd20 __lock_acquire+0x77b/0x3360 _raw_spin_lock+0x34/0x80 nfs_netfs_issue_read+0x1b2/0x4b0 [nfs] netfs_begin_read+0x77f/0x980 [netfs] nfs_netfs_readahead+0x323/0x5a0 [nfs] nfs_readahead+0x323/0x5a0 [nfs] read_pages+0xf3/0x5c0 page_cache_ra_unbounded+0x1c8/0x280 filemap_get_pages+0x38c/0xae0 filemap_read+0x206/0x5e0 nfs_file_read+0xb7/0x140 [nfs] ksys_read+0xb7/0x140”
Vettore di attacco
Punteggio CVSS
Il CVSS è un sistema di valutazione che misura la gravità di una vulnerabilità informatica considerando fattori come l’impatto potenziale, la probabilità di attacco e la facilità di esecuzione.
Riassunto: .
Dettaglio del Vettore
Metrica | Valore | Significato | Descrizione |
---|
Riferimenti esterni
- https://git.kernel.org/stable/c/ad27382f8495f8ef6d2c66c413d756bfd13c0598
- https://git.kernel.org/stable/c/8df1678c021ffeb20ef8a203bd9413f3ed9b0e9a
- https://git.kernel.org/stable/c/8a2e5977cecd3cde6a0e3e86b7b914d00240e5dc
- https://git.kernel.org/stable/c/fd5860ab6341506004219b080aea40213b299d2e
Prodotti interessati
- Linux – Linux
- Linux – Linux