VDB

CVE-2023-52582

CVE-2023-52582 PUBLISHED

netfs: Only call folio_start_fscache() one time for each folio

Reported by linux · Published March 2, 2024

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 products

VendorProductVersions
LinuxLinux3d3c95046742e4eebaa4b891b0b01cbbed94ebbd, 3d3c95046742e4eebaa4b891b0b01cbbed94ebbd, 3d3c95046742e4eebaa4b891b0b01cbbed94ebbd
LinuxLinux5.13, 0, 6.1.56
linuxlinux_kernel5.13, 5.13, 5.13
amazon:2023python3-perf0
amazon:2023kernel-tools0
LinuxLinux6.5.6, 6.1.56, 3d3c95046742e4eebaa4b891b0b01cbbed94ebbd
amazon:2023kernel-devel0
amazon:2023kernel-tools-devel0
amazon:2023bpftool0
amazon:2023kernel0
amazon:2023kernel-libbpf0
amazon:2023kernel-headers0
amazon:2023kernel-livepatch-6.1.56-82.1250
amazon:2023perf0
amazon:2023kernel-modules-extra0
amazon:2023kernel-libbpf-static0
amazon:2023kernel-libbpf-devel0

Timeline

  • Mar 2, 2024 CVE Published
  • Mar 3, 2024 EPSS Score (30 in total, the first dated here)
  • Oct 5, 2024 Coalition ESS Score (14 in total, the first dated here)
  • Jan 25, 2026 Security Advisory (104 in total, the first dated here)
  • Nov 2, 2026 Distribution Patch (94 in total, the first dated here)

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2023-52582
vulnetix vdb fixes CVE-2023-52582

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2023-52582/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

References

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›