Files
vuln-cve/data/2025/21xxx/CVE-2025-21988.json
T

159 lines
9.1 KiB
JSON

{
"dataType": "CVE_RECORD",
"dataVersion": "5.2",
"cveMetadata": {
"cveId": "CVE-2025-21988",
"assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"state": "PUBLISHED",
"assignerShortName": "Linux",
"dateReserved": "2024-12-29T08:45:45.800Z",
"datePublished": "2025-04-02T12:53:12.170Z",
"dateUpdated": "2026-08-05T11:55:52.895Z"
},
"containers": {
"cna": {
"providerMetadata": {
"orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"shortName": "Linux",
"dateUpdated": "2026-08-05T11:55:52.895Z"
},
"descriptions": [
{
"lang": "en",
"value": "In the Linux kernel, the following vulnerability has been resolved:\n\nfs/netfs/read_collect: add to next->prev_donated\n\nIf multiple subrequests donate data to the same \"next\" request\n(depending on the subrequest completion order), each of them would\noverwrite the `prev_donated` field, causing data corruption and a\nBUG() crash (\"Can't donate prior to front\")."
}
],
"metrics": [
{
"cvssV3_1": {
"version": "3.1",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"baseScore": 9.8,
"baseSeverity": "CRITICAL"
},
"scenarios": [
{
"lang": "en",
"value": "AV:N - The vulnerable donation accounting in fs/netfs is driven entirely by data returned from a remote peer — subrequest completion order, short-read lengths and non-folio-aligned boundaries are chosen by the SMB/9p/Ceph/AFS server, and `netfs_read_subreq_terminated()` is invoked directly from those filesystems' network receive paths. A malicious or compromised file server, or an on-path attacker against an unsigned/unencrypted cifs, 9p or NFS mount, reaches the bug over the network.\nAC:L - The remote server controls both sides of the race: it decides when each READ response is sent and how much data it carries, so it can deterministically make two subrequests donate to the same successor and clobber `prev_donated`. The bug was reported from ordinary production use rather than a targeted fuzz, and the affected filesystems are enabled in all mainstream kernel configs.\nPR:N - The attacker is the remote server (or an on-path attacker) and needs no credentials or account on the victim host — only that the victim have a netfs-backed mount it reads from. No local privilege on the target is involved.\nUI:N - Ordinary background readahead on an already-mounted share (fstab/automount, container volume, WSL/Kata 9p, backup or indexer scans) is enough to drive the read-collection path; no specific victim action is required.\nS:U - The corruption and crash are confined to the kernel's own page cache and netfs request state; no VM, IOMMU or sandbox boundary is crossed.\nC:H - Lost donations make `netfs_unlock_read_folio()` mark folios uptodate for ranges no subrequest ever filled and inflate `rreq->transferred`, so read() returns uninitialized page-cache pages — arbitrary previously-freed kernel memory — to userspace, and the collector can also walk off the folio queue into invalid `folioq` pointers.\nI:H - The commit states the bug causes data corruption; because `NETFS_READ_FOR_WRITE` is one of the affected origins, a folio wrongly marked uptodate with unfilled content is subsequently written back, persisting corrupted data to the file on the server, and the broken start/len/transferred bookkeeping corrupts page-cache state generally.\nA:H - The mis-accounting hits an explicit `BUG()` (\"Can't donate prior to front\"/\"fpos > start\") in the filesystem completion context, killing the worker or softirq while rolling-buffer folios remain locked — a kernel panic, or at minimum an unrecoverable hang of every task waiting on those folios and of the mount."
}
]
}
],
"affected": [
{
"product": "Linux",
"vendor": "Linux",
"defaultStatus": "unaffected",
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"programFiles": [
"fs/netfs/read_collect.c"
],
"versions": [
{
"version": "ee4cdf7ba857a894ad1650d6ab77669cbbfa329e",
"lessThan": "62b9ad7e52d4777f7e775ee1f0ad2452f6041024",
"status": "affected",
"versionType": "git"
},
{
"version": "ee4cdf7ba857a894ad1650d6ab77669cbbfa329e",
"lessThan": "e25cec3b76aba47a49138d2162fc809c6cd49c9e",
"status": "affected",
"versionType": "git"
},
{
"version": "ee4cdf7ba857a894ad1650d6ab77669cbbfa329e",
"lessThan": "e2d46f2ec332533816417b60933954173f602121",
"status": "affected",
"versionType": "git"
}
]
},
{
"product": "Linux",
"vendor": "Linux",
"defaultStatus": "affected",
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"programFiles": [
"fs/netfs/read_collect.c"
],
"versions": [
{
"version": "6.12",
"status": "affected"
},
{
"version": "0",
"lessThan": "6.12",
"status": "unaffected",
"versionType": "semver"
},
{
"version": "6.12.20",
"lessThanOrEqual": "6.12.*",
"status": "unaffected",
"versionType": "semver"
},
{
"version": "6.13.8",
"lessThanOrEqual": "6.13.*",
"status": "unaffected",
"versionType": "semver"
},
{
"version": "6.14",
"lessThanOrEqual": "*",
"status": "unaffected",
"versionType": "original_commit_for_fix"
}
]
}
],
"cpeApplicability": [
{
"nodes": [
{
"operator": "OR",
"negate": false,
"cpeMatch": [
{
"vulnerable": true,
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionStartIncluding": "6.12",
"versionEndExcluding": "6.12.20"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionStartIncluding": "6.12",
"versionEndExcluding": "6.13.8"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionStartIncluding": "6.12",
"versionEndExcluding": "6.14"
}
]
}
]
}
],
"references": [
{
"url": "https://git.kernel.org/stable/c/62b9ad7e52d4777f7e775ee1f0ad2452f6041024"
},
{
"url": "https://git.kernel.org/stable/c/e25cec3b76aba47a49138d2162fc809c6cd49c9e"
},
{
"url": "https://git.kernel.org/stable/c/e2d46f2ec332533816417b60933954173f602121"
}
],
"title": "fs/netfs/read_collect: add to next->prev_donated",
"x_generator": {
"engine": "bippy-1.2.0"
}
}
}
}