Files
vuln-cve/data/2025/38xxx/CVE-2025-38101.json
T

159 lines
9.6 KiB
JSON

{
"dataType": "CVE_RECORD",
"dataVersion": "5.2",
"cveMetadata": {
"cveId": "CVE-2025-38101",
"assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"state": "PUBLISHED",
"assignerShortName": "Linux",
"dateReserved": "2025-04-16T04:51:23.985Z",
"datePublished": "2025-07-03T08:35:10.844Z",
"dateUpdated": "2026-08-05T11:59:32.011Z"
},
"containers": {
"cna": {
"providerMetadata": {
"orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"shortName": "Linux",
"dateUpdated": "2026-08-05T11:59:32.011Z"
},
"descriptions": [
{
"lang": "en",
"value": "In the Linux kernel, the following vulnerability has been resolved:\n\nring-buffer: Fix buffer locking in ring_buffer_subbuf_order_set()\n\nEnlarge the critical section in ring_buffer_subbuf_order_set() to\nensure that error handling takes place with per-buffer mutex held,\nthus preventing list corruption and other concurrency-related issues."
}
],
"metrics": [
{
"cvssV3_1": {
"version": "3.1",
"vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"baseScore": 7.8,
"baseSeverity": "HIGH"
},
"scenarios": [
{
"lang": "en",
"value": "AV:L - The vulnerable function is reached only through a local `write()` to the tracefs file `buffer_subbuf_size_kb` (via `buffer_subbuf_size_write()`), with the error path armed by a local `mmap()` of `per_cpu/cpuN/trace_pipe_raw`. No remote or network-supplied data reaches `ring_buffer_subbuf_order_set()`.\nAC:L - The attacker owns both sides of the race — two threads writing `buffer_subbuf_size_kb` concurrently, with no `trace_types_lock` serializing `buffer_subbuf_size_write()` — and deterministically forces the unlocked `error:` path by mmap'ing a later CPU's `trace_pipe_raw` so `cpu_buffer->mapped` yields `-EBUSY` after earlier CPUs already allocated `new_pages`. The window spans a sleeping GFP_KERNEL allocation loop and a multi-page free loop whose length the attacker sets via `buffer_size_kb` and CPU count, and the attempt can be retried indefinitely.\nPR:L - No capability check exists anywhere on the path — `tracing_check_open_get_tr()` only tests `LOCKDOWN_TRACEFS` and `tracing_disabled` — so access is governed purely by tracefs DAC, which Android (`shell`, `traced_probes`/Perfetto), ChromeOS and observability/embedded deployments routinely delegate to ordinary non-root accounts and tracing groups. This matches the CNA's existing tracefs precedent (CVE-2025-38267, CVE-2025-68329, both PR:L).\nUI:N - The attacker performs the `mmap()` of `trace_pipe_raw` and both concurrent writes to `buffer_subbuf_size_kb` entirely from its own threads. No victim action, mount, or file open by another user is involved.\nS:U - The list corruption and freed-page reuse occur in the kernel's own ring-buffer allocations and stay within the host kernel's security authority. No VM, IOMMU, container, or sandbox boundary is crossed.\nC:H - The race leaves the live `cpu_buffer->pages` list pointing at `struct buffer_page` objects and order-N data pages that the other thread has already handed back via `kfree()`/`free_pages()`, so the ring buffer keeps reading from memory that the slab and page allocators have reissued to other kernel users. Reading `trace` or `trace_pipe_raw` then discloses the contents of those reallocated kernel objects.\nI:H - Concurrent `list_del_init()` against a re-initialized head produces list corruption plus double-free of both a kmalloc'd `struct buffer_page` and its `free_pages()` backing allocation — a classic heap-corruption primitive. Because `trace_marker` writes attacker-chosen bytes directly into ring-buffer data pages, the attacker can overwrite the freed-and-reallocated memory with controlled content, giving a write primitive usable for control-flow hijack.\nA:H - The corrupted linked list and double-free reliably oops the kernel — immediately under `CONFIG_DEBUG_LIST`, which turns the bad `__list_del_entry()` into a BUG, and otherwise through the subsequent `rb_check_pages()`/`rb_head_page_deactivate()` walk over freed pages. This was the syzbot-reported failure mode and the attacker can repeat it at will."
}
]
}
],
"affected": [
{
"product": "Linux",
"vendor": "Linux",
"defaultStatus": "unaffected",
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"programFiles": [
"kernel/trace/ring_buffer.c"
],
"versions": [
{
"version": "f9b94daa542a8d2532f0930f01cd9aec2d19621b",
"lessThan": "e09c0600beea469b3ebf974464e526a02d59ad62",
"status": "affected",
"versionType": "git"
},
{
"version": "f9b94daa542a8d2532f0930f01cd9aec2d19621b",
"lessThan": "0fc9a295cd8e59c3636e97395e7c74a9c89fee42",
"status": "affected",
"versionType": "git"
},
{
"version": "f9b94daa542a8d2532f0930f01cd9aec2d19621b",
"lessThan": "40ee2afafc1d9fe3aa44a6fbe440d78a5c96a72e",
"status": "affected",
"versionType": "git"
}
]
},
{
"product": "Linux",
"vendor": "Linux",
"defaultStatus": "affected",
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"programFiles": [
"kernel/trace/ring_buffer.c"
],
"versions": [
{
"version": "6.8",
"status": "affected"
},
{
"version": "0",
"lessThan": "6.8",
"status": "unaffected",
"versionType": "semver"
},
{
"version": "6.12.34",
"lessThanOrEqual": "6.12.*",
"status": "unaffected",
"versionType": "semver"
},
{
"version": "6.15.3",
"lessThanOrEqual": "6.15.*",
"status": "unaffected",
"versionType": "semver"
},
{
"version": "6.16",
"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.8",
"versionEndExcluding": "6.12.34"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionStartIncluding": "6.8",
"versionEndExcluding": "6.15.3"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionStartIncluding": "6.8",
"versionEndExcluding": "6.16"
}
]
}
]
}
],
"references": [
{
"url": "https://git.kernel.org/stable/c/e09c0600beea469b3ebf974464e526a02d59ad62"
},
{
"url": "https://git.kernel.org/stable/c/0fc9a295cd8e59c3636e97395e7c74a9c89fee42"
},
{
"url": "https://git.kernel.org/stable/c/40ee2afafc1d9fe3aa44a6fbe440d78a5c96a72e"
}
],
"title": "ring-buffer: Fix buffer locking in ring_buffer_subbuf_order_set()",
"x_generator": {
"engine": "bippy-1.2.0"
}
}
}
}