CVE-2025-37779

Source
https://nvd.nist.gov/vuln/detail/CVE-2025-37779
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-37779.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-37779
Downstream
Published
2025-05-01T13:07:17Z
Modified
2025-10-10T09:20:12.525091Z
Summary
lib/iov_iter: fix to increase non slab folio refcount
Details

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

lib/iov_iter: fix to increase non slab folio refcount

When testing EROFS file-backed mount over v9fs on qemu, I encountered a folio UAF issue. The page sanity check reports the following call trace. The root cause is that pages in bvec are coalesced across a folio bounary. The refcount of all non-slab folios should be increased to ensure p9releaspages can put them correctly.

BUG: Bad page state in process md5sum pfn:18300 page: refcount:0 mapcount:0 mapping:00000000d5ad8e4e index:0x60 pfn:0x18300 head: order:0 mapcount:0 entiremapcount:0 nrpagesmapped:0 pincount:0 aops:zerofsaops ino:30b0f dentry name(?):"GoogleExtServicesCn.apk" flags: 0x100000000000041(locked|head|node=0|zone=1) raw: 0100000000000041 dead000000000100 dead000000000122 ffff888014b13bd0 raw: 0000000000000060 0000000000000020 00000000ffffffff 0000000000000000 head: 0100000000000041 dead000000000100 dead000000000122 ffff888014b13bd0 head: 0000000000000060 0000000000000020 00000000ffffffff 0000000000000000 head: 0100000000000000 0000000000000000 ffffffffffffffff 0000000000000000 head: 0000000000000010 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: PAGEFLAGSCHECKATFREE flag(s) set Call Trace: dumpstacklvl+0x53/0x70 badpage+0xd4/0x220 _freepagesok+0x76d/0xf30 _folioput+0x230/0x320 p9releasepages+0x179/0x1f0 p9virtiozcrequest+0xa2a/0x1230 p9clientzcrpc.constprop.0+0x247/0x700 p9clientreadonce+0x34d/0x810 p9clientread+0xf3/0x150 v9fsissueread+0x111/0x360 netfsunbufferedreaditerlocked+0x927/0x1390 netfsunbufferedreaditer+0xa2/0xe0 vfsiocbiterread+0x2c7/0x460 erofsfileiorqsubmit+0x46b/0x5b0 zerofsrunqueue+0x1203/0x21e0 zerofsreadahead+0x579/0x8b0 readpages+0x19f/0xa70 pagecacheraorder+0x4ad/0xb80 filemapreadahead.isra.0+0xe7/0x150 filemapgetpages+0x7aa/0x1890 filemapread+0x320/0xc80 vfsread+0x6c6/0xa30 ksysread+0xf9/0x1c0 dosyscall64+0x9e/0x1a0 entrySYSCALL64after_hwframe+0x71/0x79

References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
b9c0e49abfca06f1a109acea834bcfc934f33f76
Fixed
d833f21162c4d536d729628f8cf1ee8d4110f2b7
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
b9c0e49abfca06f1a109acea834bcfc934f33f76
Fixed
770c8d55c42868239c748a3ebc57c9e37755f842

Affected versions

v6.*

v6.14
v6.14-rc7
v6.14.1
v6.14.2
v6.14.3
v6.15-rc1

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.14.0
Fixed
6.14.4