In the Linux kernel, the following vulnerability has been resolved:
bpf: Reject %p% format string in bprintf-like helpers
static const char fmt[] = "%p%"; bpftraceprintk(fmt, sizeof(fmt));
The above BPF program isn't rejected and causes a kernel warning at runtime:
Please remove unsupported %\x00 in format string
WARNING: CPU: 1 PID: 7244 at lib/vsprintf.c:2680 format_decode+0x49c/0x5d0
This happens because bpfbprintfprepare skips over the second %, detected as punctuation, while processing %p. This patch fixes it by not skipping over punctuation. %\x00 is then processed in the next iteration and rejected.
[
{
"id": "CVE-2025-38528-0be124c5",
"target": {
"file": "kernel/bpf/helpers.c"
},
"signature_version": "v1",
"signature_type": "Line",
"digest": {
"line_hashes": [
"186760795726133885232517429843571189783",
"243202559671202197626558460950195284022",
"327468055688628335606624651126939987377",
"238876675884811106955491451931448413655",
"224359103310296719902620305085853302580",
"192682100092506683586315421237434809141",
"109109339250078431880430119015611537446",
"121548543038918410185290605186771840040",
"262085328518444420831393303319470810892",
"234763771630338694489558989336187569328"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1c5f5fd47bbda17cb885fe6f03730702cd53d3f8",
"deprecated": false
},
{
"id": "CVE-2025-38528-328e20d5",
"target": {
"function": "bpf_bprintf_prepare",
"file": "kernel/bpf/helpers.c"
},
"signature_version": "v1",
"signature_type": "Function",
"digest": {
"length": 3854.0,
"function_hash": "29754068685621767026196785507108835961"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6952aeace93f8c9ea01849efecac24dd3152c9c9",
"deprecated": false
},
{
"id": "CVE-2025-38528-d98d32b1",
"target": {
"function": "bpf_bprintf_prepare",
"file": "kernel/bpf/helpers.c"
},
"signature_version": "v1",
"signature_type": "Function",
"digest": {
"length": 3854.0,
"function_hash": "29754068685621767026196785507108835961"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1c5f5fd47bbda17cb885fe6f03730702cd53d3f8",
"deprecated": false
},
{
"id": "CVE-2025-38528-ee3a8aff",
"target": {
"file": "kernel/bpf/helpers.c"
},
"signature_version": "v1",
"signature_type": "Line",
"digest": {
"line_hashes": [
"186760795726133885232517429843571189783",
"243202559671202197626558460950195284022",
"327468055688628335606624651126939987377",
"238876675884811106955491451931448413655",
"224359103310296719902620305085853302580",
"192682100092506683586315421237434809141",
"109109339250078431880430119015611537446",
"121548543038918410185290605186771840040",
"262085328518444420831393303319470810892",
"234763771630338694489558989336187569328"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6952aeace93f8c9ea01849efecac24dd3152c9c9",
"deprecated": false
}
]