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

269 lines
15 KiB
JSON

{
"dataType": "CVE_RECORD",
"dataVersion": "5.2",
"cveMetadata": {
"cveId": "CVE-2025-38528",
"assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"state": "PUBLISHED",
"assignerShortName": "Linux",
"dateReserved": "2025-04-16T04:51:24.023Z",
"datePublished": "2025-08-16T11:12:21.667Z",
"dateUpdated": "2026-10-15T21:52:18.869Z"
},
"containers": {
"cna": {
"providerMetadata": {
"orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"shortName": "Linux",
"dateUpdated": "2026-08-05T12:02:41.331Z"
},
"descriptions": [
{
"lang": "en",
"value": "In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Reject %p% format string in bprintf-like helpers\n\nstatic const char fmt[] = \"%p%\";\n bpf_trace_printk(fmt, sizeof(fmt));\n\nThe above BPF program isn't rejected and causes a kernel warning at\nruntime:\n\n Please remove unsupported %\\x00 in format string\n WARNING: CPU: 1 PID: 7244 at lib/vsprintf.c:2680 format_decode+0x49c/0x5d0\n\nThis happens because bpf_bprintf_prepare skips over the second %,\ndetected as punctuation, while processing %p. This patch fixes it by\nnot skipping over punctuation. %\\x00 is then processed in the next\niteration and rejected."
}
],
"metrics": [
{
"cvssV3_1": {
"version": "3.1",
"vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H",
"baseScore": 7.1,
"baseSeverity": "HIGH"
},
"scenarios": [
{
"lang": "en",
"value": "AV:L - The only trigger is a locally loaded eBPF program invoking a bprintf-like helper (`bpf_trace_printk`, `bpf_trace_vprintk`, `bpf_snprintf`, `bpf_seq_printf`) via the `bpf()` syscall; the format string is attacker-authored at `BPF_PROG_LOAD` time and consumed in the calling task's own context. No remote peer or packet can supply a format string.\nAC:L - The attacker fully controls the constant format string, so `\"%p%\"` deterministically reaches the `WARN_ONCE` in `format_decode()` and `\"%p%s\"` deterministically desyncs `bpf_bprintf_prepare()` from `bstr_printf()` on the first call — no race, no timing window, no dependence on memory layout the attacker cannot influence.\nPR:L - Reaching the helpers requires CAP_BPF plus CAP_PERFMON (or CAP_SYS_ADMIN) rather than full root, and these are routinely granted to non-root eBPF observability/profiling service accounts and can be delegated into a user namespace via a BPF token (supported in all affected 6.9+ branches), so a low-privilege non-root actor suffices.\nUI:N - The attacker performs self-contained `bpf(BPF_PROG_LOAD)` and program-run/attach operations; no victim must mount a filesystem, open a file, or take any other action.\nS:U - The faulty parse, the warning, and the stale-memory read all occur in the kernel's own security authority within the calling task's context; no hypervisor, IOMMU, or sandbox boundary is crossed.\nC:H - The prepare/print desync makes `bstr_printf()`'s `FORMAT_STATE_STR` `strlen()` and copy uninitialized bytes from the per-CPU `bpf_bprintf_buffers` (512-byte `bin_args` followed by the 1024-byte `buf`, and potentially past the struct into adjacent per-CPU memory) straight into the `bpf_snprintf` output buffer or trace ring buffer that the attacker reads; because `nocopy_fmt` stores raw unhashed 64-bit values there, this leaks unsanitized kernel pointers, on top of the KASLR-defeating backtrace the `WARN_ONCE` dumps to dmesg.\nI:N - All writes stay bounded — `nocopy_fmt` checks `tmp_buf_end - tmp_buf` before storing, and `bstr_printf()`/`string()` gate every store on `str < end` — so the bug under-fills the argument buffer rather than overflowing it; no kernel or user memory is modified out of bounds.\nA:H - `\"%p%\"` triggers `WARN_ONCE` at `lib/vsprintf.c:2807`, which becomes a full kernel panic on the widely deployed `panic_on_warn=1` used in hardened cloud, Android, and fuzzing configurations — exactly the crash syzbot reported — and the unbounded `strlen()` over per-CPU memory can additionally fault; even without `panic_on_warn` the splat taints the kernel and can trip health-check tooling into taking the node down."
}
]
}
],
"affected": [
{
"product": "Linux",
"vendor": "Linux",
"defaultStatus": "unaffected",
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"programFiles": [
"kernel/bpf/helpers.c"
],
"versions": [
{
"version": "48cac3f4a96ddf08df8e53809ed066de0dc93915",
"lessThan": "97303e541e12f1fea97834ec64b98991e8775f39",
"status": "affected",
"versionType": "git"
},
{
"version": "48cac3f4a96ddf08df8e53809ed066de0dc93915",
"lessThan": "61d5fa45ed13e42af14c7e959baba9908b8ee6d4",
"status": "affected",
"versionType": "git"
},
{
"version": "48cac3f4a96ddf08df8e53809ed066de0dc93915",
"lessThan": "e7be679124bae8cf4fa6e40d7e1661baddfb3289",
"status": "affected",
"versionType": "git"
},
{
"version": "48cac3f4a96ddf08df8e53809ed066de0dc93915",
"lessThan": "6952aeace93f8c9ea01849efecac24dd3152c9c9",
"status": "affected",
"versionType": "git"
},
{
"version": "48cac3f4a96ddf08df8e53809ed066de0dc93915",
"lessThan": "1c5f5fd47bbda17cb885fe6f03730702cd53d3f8",
"status": "affected",
"versionType": "git"
},
{
"version": "48cac3f4a96ddf08df8e53809ed066de0dc93915",
"lessThan": "f8242745871f81a3ac37f9f51853d12854fd0b58",
"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/bpf/helpers.c"
],
"versions": [
{
"version": "5.13",
"status": "affected"
},
{
"version": "0",
"lessThan": "5.13",
"status": "unaffected",
"versionType": "semver"
},
{
"version": "5.15.190",
"lessThanOrEqual": "5.15.*",
"status": "unaffected",
"versionType": "semver"
},
{
"version": "6.1.147",
"lessThanOrEqual": "6.1.*",
"status": "unaffected",
"versionType": "semver"
},
{
"version": "6.6.100",
"lessThanOrEqual": "6.6.*",
"status": "unaffected",
"versionType": "semver"
},
{
"version": "6.12.40",
"lessThanOrEqual": "6.12.*",
"status": "unaffected",
"versionType": "semver"
},
{
"version": "6.15.8",
"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": "5.13",
"versionEndExcluding": "5.15.190"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionStartIncluding": "5.13",
"versionEndExcluding": "6.1.147"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionStartIncluding": "5.13",
"versionEndExcluding": "6.6.100"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionStartIncluding": "5.13",
"versionEndExcluding": "6.12.40"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionStartIncluding": "5.13",
"versionEndExcluding": "6.15.8"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionStartIncluding": "5.13",
"versionEndExcluding": "6.16"
}
]
}
]
}
],
"references": [
{
"url": "https://git.kernel.org/stable/c/97303e541e12f1fea97834ec64b98991e8775f39"
},
{
"url": "https://git.kernel.org/stable/c/61d5fa45ed13e42af14c7e959baba9908b8ee6d4"
},
{
"url": "https://git.kernel.org/stable/c/e7be679124bae8cf4fa6e40d7e1661baddfb3289"
},
{
"url": "https://git.kernel.org/stable/c/6952aeace93f8c9ea01849efecac24dd3152c9c9"
},
{
"url": "https://git.kernel.org/stable/c/1c5f5fd47bbda17cb885fe6f03730702cd53d3f8"
},
{
"url": "https://git.kernel.org/stable/c/f8242745871f81a3ac37f9f51853d12854fd0b58"
}
],
"title": "bpf: Reject %p% format string in bprintf-like helpers",
"x_generator": {
"engine": "bippy-1.2.0"
}
},
"adp": [
{
"title": "CVE Program Container",
"references": [
{
"url": "https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html"
}
],
"providerMetadata": {
"orgId": "af854a3a-2127-422b-91ae-364da2661108",
"shortName": "CVE",
"dateUpdated": "2025-11-03T17:39:24.864Z"
}
},
{
"metrics": [
{
"other": {
"type": "ssvc",
"content": {
"id": "CVE-2025-38528",
"role": "CISA Coordinator",
"options": [
{
"Exploitation": "none"
},
{
"Automatable": "no"
},
{
"Technical Impact": "partial"
}
],
"version": "2.0.3",
"timestamp": "2026-10-15T21:51:29.402427Z"
}
}
}
],
"title": "CISA ADP Vulnrichment",
"providerMetadata": {
"orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"shortName": "CISA-ADP",
"dateUpdated": "2026-10-15T21:52:18.869Z"
}
}
]
}
}