CVE-2023-52582

Source
https://nvd.nist.gov/vuln/detail/CVE-2023-52582
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-52582.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2023-52582
Related
Published
2024-03-02T22:15:49Z
Modified
2024-09-18T03:24:33.499847Z
Summary
[none]
Details

In the Linux kernel, the following vulnerability has been resolved:

netfs: Only call foliostartfscache() 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 netfsrrequnlockfolios() to set any folios to be written back, we need to make sure we only call foliostart_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: VMBUGONFOLIO(foliotestprivate2(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:netfsrrequnlockfolios+0x68e/0x730 [netfs] ... Call Trace: netfsrreqassess+0x497/0x660 [netfs] netfssubreqterminated+0x32b/0x610 [netfs] nfsnetfsreadcompletion+0x14e/0x1a0 [nfs] nfsreadcompletion+0x2f9/0x330 [nfs] rpcfreetask+0x72/0xa0 [sunrpc] rpcasyncrelease+0x46/0x70 [sunrpc] processonework+0x3bd/0x710 workerthread+0x89/0x610 kthread+0x181/0x1c0 retfrom_fork+0x29/0x50

References

Affected packages

Debian:12 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
6.1.64-1

Affected versions

6.*

6.1.27-1
6.1.37-1
6.1.38-1
6.1.38-2~bpo11+1
6.1.38-2
6.1.38-3
6.1.38-4~bpo11+1
6.1.38-4
6.1.52-1
6.1.55-1~bpo11+1
6.1.55-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Debian:13 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
6.5.6-1

Affected versions

6.*

6.1.27-1
6.1.37-1
6.1.38-1
6.1.38-2~bpo11+1
6.1.38-2
6.1.38-3
6.1.38-4~bpo11+1
6.1.38-4
6.1.52-1
6.1.55-1~bpo11+1
6.1.55-1
6.1.64-1
6.1.66-1
6.1.67-1
6.1.69-1~bpo11+1
6.1.69-1
6.1.76-1~bpo11+1
6.1.76-1
6.1.82-1
6.1.85-1
6.1.90-1~bpo11+1
6.1.90-1
6.1.94-1~bpo11+1
6.1.94-1
6.1.98-1
6.1.99-1
6.1.106-1
6.1.106-2
6.1.106-3
6.3.1-1~exp1
6.3.2-1~exp1
6.3.4-1~exp1
6.3.5-1~exp1
6.3.7-1~bpo12+1
6.3.7-1
6.3.11-1
6.4~rc6-1~exp1
6.4~rc7-1~exp1
6.4.1-1~exp1
6.4.4-1~bpo12+1
6.4.4-1
6.4.4-2
6.4.4-3~bpo12+1
6.4.4-3
6.4.11-1
6.4.13-1
6.5~rc4-1~exp1
6.5~rc6-1~exp1
6.5~rc7-1~exp1
6.5.1-1~exp1
6.5.3-1~bpo12+1
6.5.3-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}