CVE-2025-38586 (GCVE-0-2025-38586)
Vulnerability from cvelistv5
Published
2025-08-19 17:03
Modified
2026-08-05 12:03
Summary
In the Linux kernel, the following vulnerability has been resolved: bpf, arm64: Fix fp initialization for exception boundary In the ARM64 BPF JIT when prog->aux->exception_boundary is set for a BPF program, find_used_callee_regs() is not called because for a program acting as exception boundary, all callee saved registers are saved. find_used_callee_regs() sets `ctx->fp_used = true;` when it sees FP being used in any of the instructions. For programs acting as exception boundary, ctx->fp_used remains false even if frame pointer is used by the program and therefore, FP is not set-up for such programs in the prologue. This can cause the kernel to crash due to a pagefault. Fix it by setting ctx->fp_used = true for exception boundary programs as fp is always saved in such programs.
Impacted products
Vendor Product Version
Linux Linux Version: 5d4fa9ec5643a5c75d3c1e6abf50fb9284caf1ff
Version: 5d4fa9ec5643a5c75d3c1e6abf50fb9284caf1ff
Version: 5d4fa9ec5643a5c75d3c1e6abf50fb9284caf1ff
Version: 5d4fa9ec5643a5c75d3c1e6abf50fb9284caf1ff
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "arch/arm64/net/bpf_jit_comp.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "0dbef493cae7d451f740558665893c000adb2321",
              "status": "affected",
              "version": "5d4fa9ec5643a5c75d3c1e6abf50fb9284caf1ff",
              "versionType": "git"
            },
            {
              "lessThan": "e23184725dbb72d5d02940222eee36dbba2aa422",
              "status": "affected",
              "version": "5d4fa9ec5643a5c75d3c1e6abf50fb9284caf1ff",
              "versionType": "git"
            },
            {
              "lessThan": "1ce30231e0a2c8c361ee5f8f7f265fc17130adce",
              "status": "affected",
              "version": "5d4fa9ec5643a5c75d3c1e6abf50fb9284caf1ff",
              "versionType": "git"
            },
            {
              "lessThan": "b114fcee766d5101eada1aca7bb5fd0a86c89b35",
              "status": "affected",
              "version": "5d4fa9ec5643a5c75d3c1e6abf50fb9284caf1ff",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "arch/arm64/net/bpf_jit_comp.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.12"
            },
            {
              "lessThan": "6.12",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.42",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.15.*",
              "status": "unaffected",
              "version": "6.15.10",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.16.*",
              "status": "unaffected",
              "version": "6.16.1",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.17",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.42",
                  "versionStartIncluding": "6.12",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.15.10",
                  "versionStartIncluding": "6.12",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.16.1",
                  "versionStartIncluding": "6.12",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.17",
                  "versionStartIncluding": "6.12",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "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-\u003eaux-\u003eexception_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-\u003efp_used = true;` when it sees FP\nbeing used in any of the instructions.\n\nFor programs acting as exception boundary, ctx-\u003efp_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-\u003efp_used = true for exception boundary programs as\nfp is always saved in such programs."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.8,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "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 \u2014 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-\u003ebpf_capable (CAP_BPF), but bpf_token_capable() resolves via bpf_ns_capable() against the token\u0027s 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."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T12:03:11.522Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "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"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-38586",
    "datePublished": "2025-08-19T17:03:08.012Z",
    "dateReserved": "2025-04-16T04:51:24.026Z",
    "dateUpdated": "2026-08-05T12:03:11.522Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…