5.5medium
netfs: Only call folio_start_fscache() one time for each folio
- Severity
- 5.5medium CVSS:3.1 by NVD
- Exploit likelihood
- 0.22% (higher than 14% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- Linux
Description
In the Linux kernel, the following vulnerability has been resolved: netfs: Only call folio_start_fscache() one time for each folio If a network filesystem using netfs implements a clamp_length() function, it can set subrequest lengths smaller than a page size. When we loop through the folios in netfs_rreq_unlock_folios() to set any folios to be written back, we need to make sure we only call folio_start_fscache() once for each folio. Otherwise, this simple testcase: mount -o fsc,rsize=1024,wsize=1024 127.0.0.1:/export /mnt/nfs dd if=/dev/zero of=/mnt/nfs/file.bin bs=4096 count=1 1+0 records in 1+0 records out 4096 bytes (4.1 kB, 4.0 KiB) copied, 0.0126359 s, 324 kB/s echo 3 > /proc/sys/vm/drop_caches cat /mnt/nfs/file.bin > /dev/null will trigger an oops similar to the following: page dumped because: VM_BUG_ON_FOLIO(folio_test_private_2(folio)) ------------[ cut here ]------------ kernel BUG at include/linux/netfs.h:44! ... CPU: 5 PID: 134 Comm: kworker/u16:5 Kdump: loaded Not tainted 6.4.0-rc5 ... RIP: 0010:netfs_rreq_unlock_folios+0x68e/0x730 [netfs] ... Call Trace: netfs_rreq_assess+0x497/0x660 [netfs] netfs_subreq_terminated+0x32b/0x610 [netfs] nfs_netfs_read_completion+0x14e/0x1a0 [nfs] nfs_read_completion+0x2f9/0x330 [nfs] rpc_free_task+0x72/0xa0 [sunrpc] rpc_async_release+0x46/0x70 [sunrpc] process_one_work+0x3bd/0x710 worker_thread+0x89/0x610 kthread+0x181/0x1c0 ret_from_fork+0x29/0x50
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Linux Linux | from 3d3c95046742e4eebaa4b891b0b01cbbed94ebbd before df9950d37df113db59495fa09d060754366a2b7c, from 3d3c95046742e4eebaa4b891b0b01cbbed94ebbd before d9f5537479d4ec97ea92ff24e81a517d5772581a, from 3d3c95046742e4eebaa4b891b0b01cbbed94ebbd before df1c357f25d808e30b216188330e708e09e1a412, 5.13 Not affected: before 5.13, from 6.1.56 up to 6.1.*, from 6.5.6 up to 6.5.*, from 6.6 up to * | CVE List |
| linux linux_kernel | from 5.13 before 6.1.56, from 6.2 before 6.5.6, 6.6 | 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: netfs: Only call folio_start_fscache() one time for each folio If a network filesystem using netfs implements a clamp_length() function, it can set subrequest lengths smaller than a page size. When we loop through the folios in netfs_rreq_unlock_folios() to set any folios to be written back, we need to make sure we only call folio_start_fscache() once for each folio. Otherwise, this simple testcase: mount -o fsc,rsize=1024,wsize=1024 127.0.0.1:/export /mnt/nfs dd if=/dev/zero of=/mnt/nfs/file.bin bs=4096 count=1 1+0 records in 1+0 records out 4096 bytes (4.1 kB, 4.0 KiB) copied, 0.0126359 s, 324 kB/s echo 3 > /proc/sys/vm/drop_caches cat /mnt/nfs/file.bin > /dev/null will trigger an oops similar to the following: page dumped because: VM_BUG_ON_FOLIO(folio_test_private_2(folio)) ------------[ cut here ]------------ kernel BUG at include/linux/netfs.h:44! ... CPU: 5 PID: 134 Comm: kworker/u16:5 Kdump: loaded Not tainted 6.4.0-rc5 ... RIP: 0010:netfs_rreq_unlock_folios+0x68e/0x730 [netfs] ... Call Trace: netfs_rreq_assess+0x497/0x660 [netfs] netfs_subreq_terminated+0x32b/0x610 [netfs] nfs_netfs_read_completion+0x14e/0x1a0 [nfs] nfs_read_completion+0x2f9/0x330 [nfs] rpc_free_task+0x72/0xa0 [sunrpc] rpc_async_release+0x46/0x70 [sunrpc] process_one_work+0x3bd/0x710 worker_thread+0x89/0x610 kthread+0x181/0x1c0 ret_from_fork+0x29/0x50
NVD (es)
En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: netfs: solo llame a folio_start_fscache() una vez para cada folio. Si un sistema de archivos de red que utiliza netfs implementa una función abrazadera_longitud(), puede establecer longitudes de subsolicitud más pequeñas que el tamaño de una página. Cuando recorremos las publicaciones en netfs_rreq_unlock_folios() para configurar las publicaciones que se reescribirán, debemos asegurarnos de llamar solo a folio_start_fscache() una vez para cada publicación. De lo contrario, este caso de prueba simple: mount -o fsc,rsize=1024,wsize=1024 127.0.0.1:/export /mnt/nfs dd if=/dev/zero of=/mnt/nfs/file.bin bs=4096 count= 1 1+0 registros en 1+0 registros en salida 4096 bytes (4,1 kB, 4,0 KiB) copiados, 0,0126359 s, 324 kB/s echo 3 > /proc/sys/vm/drop_caches cat /mnt/nfs/file.bin > /dev/null desencadenará un error similar al siguiente: página volcada porque: VM_BUG_ON_FOLIO(folio_test_private_2(folio)) ------------[ cortar aquí ]---------- -- ¡ERROR del kernel en include/linux/netfs.h:44! ... CPU: 5 PID: 134 Comm: kworker/u16:5 Kdump: cargado No contaminado 6.4.0-rc5 ... RIP: 0010:netfs_rreq_unlock_folios+0x68e/0x730 [netfs] ... Seguimiento de llamadas: netfs_rreq_assess+0x497 /0x660 [netfs] netfs_subreq_terminate+0x32b/0x610 [netfs] nfs_netfs_read_completion+0x14e/0x1a0 [nfs] nfs_read_completion+0x2f9/0x330 [nfs] rpc_free_task+0x72/0xa0 [sunrpc] rpc_a sync_release+0x46/0x70 [sunrpc] proceso_one_work+0x3bd/0x710 hilo_trabajador+0x89/0x610 kthread+0x181/0x1c0 ret_from_fork+0x29/0x50
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2023-52582 changed 2026-05-11 | CVE Terms of Use |
| NVD | CVE-2023-52582 changed 2026-06-17 | Public domain |