{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2025-38586",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2025-04-16T04:51:24.026Z",
        "datePublished": "2025-08-19T17:03:08.012Z",
        "dateUpdated": "2026-08-05T12:03:11.522Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T12:03:11.522Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nbpf, arm64: Fix fp initialization for exception boundary\n\nIn the ARM64 BPF JIT when prog->aux->exception_boundary is set for a BPF\nprogram, find_used_callee_regs() is not called because for a program\nacting as exception boundary, all callee saved registers are saved.\nfind_used_callee_regs() sets `ctx->fp_used = true;` when it sees FP\nbeing used in any of the instructions.\n\nFor programs acting as exception boundary, ctx->fp_used remains false\neven if frame pointer is used by the program and therefore, FP is not\nset-up for such programs in the prologue. This can cause the kernel to\ncrash due to a pagefault.\n\nFix it by setting ctx->fp_used = true for exception boundary programs as\nfp is always saved in such programs."
                }
            ],
            "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 - Exploitation requires loading a BPF program via the bpf(BPF_PROG_LOAD) syscall on an arm64 kernel with the JIT enabled, which is local access only. Per kernel scoring guidance BPF is Local, even though the resulting program may subsequently be triggered by network traffic (tc/XDP/socket filter attach points).\nAC:L - The miscompilation is fully deterministic — any program calling bpf_throw becomes an exception boundary and its main program is JITed with x25 (BPF r10) uninitialized, with no race, timing, or memory-layout condition involved. arm64 with CONFIG_BPF_JIT is a default, ubiquitous configuration (Android, Graviton cloud instances, embedded/automotive), not a rare build option.\nPR:L - Calling the bpf_throw kfunc requires env->bpf_capable (CAP_BPF), but bpf_token_capable() resolves via bpf_ns_capable() against the token's user namespace, so a delegated BPF token gives an otherwise unprivileged container user this capability. This matches the established scoring for BPF verifier/JIT flaws and does not require real root in the init namespace.\nUI:N - The attacker loads and invokes their own BPF program; no action by any other user or victim process is needed. The malformed JIT code is generated and executed entirely under attacker control.\nS:U - The corruption occurs in kernel memory within the same security authority as the attacking process, with no crossing of a VM, IOMMU, or sandbox boundary. This is a standard local kernel privilege-escalation class issue.\nC:H - JITed code dereferences an uninitialized x25 that holds a live kernel pointer inherited from an ancestor frame, so r10-relative loads and helper calls taking stack pointers read arbitrary kernel memory that can be exfiltrated through BPF maps or ringbuf. For kprobe/tracepoint/perf_event programs the uninitialized private-stack pointer x27 routes every stack read to that wild address.\nI:H - The same wild pointer is used for r10-relative stores, atomics, and helper output buffers, giving a write of fully attacker-controlled data at a kernel address derived from a live kernel object pointer with attacker-chosen offsets. That is a targeted kernel memory-corruption primitive suitable for control-flow hijacking and privilege escalation.\nA:H - The commit message explicitly states the uninitialized frame pointer \"can cause the kernel to crash due to a pagefault,\" and any dereference of the stale x25/x27 value reliably produces an oops or panic. The condition is trivially and repeatedly triggerable by loading and running such a program."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "arch/arm64/net/bpf_jit_comp.c"
                    ],
                    "versions": [
                        {
                            "version": "5d4fa9ec5643a5c75d3c1e6abf50fb9284caf1ff",
                            "lessThan": "0dbef493cae7d451f740558665893c000adb2321",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "5d4fa9ec5643a5c75d3c1e6abf50fb9284caf1ff",
                            "lessThan": "e23184725dbb72d5d02940222eee36dbba2aa422",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "5d4fa9ec5643a5c75d3c1e6abf50fb9284caf1ff",
                            "lessThan": "1ce30231e0a2c8c361ee5f8f7f265fc17130adce",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "5d4fa9ec5643a5c75d3c1e6abf50fb9284caf1ff",
                            "lessThan": "b114fcee766d5101eada1aca7bb5fd0a86c89b35",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "arch/arm64/net/bpf_jit_comp.c"
                    ],
                    "versions": [
                        {
                            "version": "6.12",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "6.12",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.12.42",
                            "lessThanOrEqual": "6.12.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.15.10",
                            "lessThanOrEqual": "6.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.16.1",
                            "lessThanOrEqual": "6.16.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.17",
                            "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.42"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.12",
                                    "versionEndExcluding": "6.15.10"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.12",
                                    "versionEndExcluding": "6.16.1"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.12",
                                    "versionEndExcluding": "6.17"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/0dbef493cae7d451f740558665893c000adb2321"
                },
                {
                    "url": "https://git.kernel.org/stable/c/e23184725dbb72d5d02940222eee36dbba2aa422"
                },
                {
                    "url": "https://git.kernel.org/stable/c/1ce30231e0a2c8c361ee5f8f7f265fc17130adce"
                },
                {
                    "url": "https://git.kernel.org/stable/c/b114fcee766d5101eada1aca7bb5fd0a86c89b35"
                }
            ],
            "title": "bpf, arm64: Fix fp initialization for exception boundary",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}