CVE-2025-40151 (GCVE-0-2025-40151)

Vulnerability from cvelistv5 – Published: 2025-11-12 10:23 – Updated: 2026-08-05 12:08
VLAI
Title
LoongArch: BPF: No support of struct argument in trampoline programs
Summary
In the Linux kernel, the following vulnerability has been resolved: LoongArch: BPF: No support of struct argument in trampoline programs The current implementation does not support struct argument. This causes a oops when running bpf selftest: $ ./test_progs -a tracing_struct Oops[#1]: CPU -1 Unable to handle kernel paging request at virtual address 0000000000000018, era == 9000000085bef268, ra == 90000000844f3938 rcu: INFO: rcu_preempt detected stalls on CPUs/tasks: rcu: 1-...0: (19 ticks this GP) idle=1094/1/0x4000000000000000 softirq=1380/1382 fqs=801 rcu: (detected by 0, t=5252 jiffies, g=1197, q=52 ncpus=4) Sending NMI from CPU 0 to CPUs 1: rcu: rcu_preempt kthread starved for 2495 jiffies! g1197 f0x0 RCU_GP_DOING_FQS(6) ->state=0x0 ->cpu=2 rcu: Unless rcu_preempt kthread gets sufficient CPU time, OOM is now expected behavior. rcu: RCU grace-period kthread stack dump: task:rcu_preempt state:I stack:0 pid:15 tgid:15 ppid:2 task_flags:0x208040 flags:0x00000800 Stack : 9000000100423e80 0000000000000402 0000000000000010 90000001003b0680 9000000085d88000 0000000000000000 0000000000000040 9000000087159350 9000000085c2b9b0 0000000000000001 900000008704a000 0000000000000005 00000000ffff355b 00000000ffff355b 0000000000000000 0000000000000004 9000000085d90510 0000000000000000 0000000000000002 7b5d998f8281e86e 00000000ffff355c 7b5d998f8281e86e 000000000000003f 9000000087159350 900000008715bf98 0000000000000005 9000000087036000 900000008704a000 9000000100407c98 90000001003aff80 900000008715c4c0 9000000085c2b9b0 00000000ffff355b 9000000085c33d3c 00000000000000b4 0000000000000000 9000000007002150 00000000ffff355b 9000000084615480 0000000007000002 ... Call Trace: [<9000000085c2a868>] __schedule+0x410/0x1520 [<9000000085c2b9ac>] schedule+0x34/0x190 [<9000000085c33d38>] schedule_timeout+0x98/0x140 [<90000000845e9120>] rcu_gp_fqs_loop+0x5f8/0x868 [<90000000845ed538>] rcu_gp_kthread+0x260/0x2e0 [<900000008454e8a4>] kthread+0x144/0x238 [<9000000085c26b60>] ret_from_kernel_thread+0x28/0xc8 [<90000000844f20e4>] ret_from_kernel_thread_asm+0xc/0x88 rcu: Stack dump where RCU GP kthread last ran: Sending NMI from CPU 0 to CPUs 2: NMI backtrace for cpu 2 skipped: idling at idle_exit+0x0/0x4 Reject it for now.
Assigner
Impacted products
Vendor Product Version
Linux Linux Affected: f9b6b41f0cf31791541cea9644ddbedb46465801 , < d1158559315143e11bfaabcd4b2bea98c7ed1be9 (git)
Affected: f9b6b41f0cf31791541cea9644ddbedb46465801 , < e82406c7cbdd368c5459b8a45e118811d2ba0794 (git)
Create a notification for this product.
Linux Linux Affected: 6.17
Unaffected: 0 , < 6.17 (semver)
Unaffected: 6.17.3 , ≤ 6.17.* (semver)
Unaffected: 6.18 , ≤ * (original_commit_for_fix)
Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "arch/loongarch/net/bpf_jit.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "d1158559315143e11bfaabcd4b2bea98c7ed1be9",
              "status": "affected",
              "version": "f9b6b41f0cf31791541cea9644ddbedb46465801",
              "versionType": "git"
            },
            {
              "lessThan": "e82406c7cbdd368c5459b8a45e118811d2ba0794",
              "status": "affected",
              "version": "f9b6b41f0cf31791541cea9644ddbedb46465801",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "arch/loongarch/net/bpf_jit.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.17"
            },
            {
              "lessThan": "6.17",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.17.*",
              "status": "unaffected",
              "version": "6.17.3",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.18",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.17.3",
                  "versionStartIncluding": "6.17",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18",
                  "versionStartIncluding": "6.17",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nLoongArch: BPF: No support of struct argument in trampoline programs\n\nThe current implementation does not support struct argument. This causes\na oops when running bpf selftest:\n\n  $ ./test_progs -a tracing_struct\n  Oops[#1]:\n  CPU -1 Unable to handle kernel paging request at virtual address 0000000000000018, era == 9000000085bef268, ra == 90000000844f3938\n  rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:\n  rcu:     1-...0: (19 ticks this GP) idle=1094/1/0x4000000000000000 softirq=1380/1382 fqs=801\n  rcu:     (detected by 0, t=5252 jiffies, g=1197, q=52 ncpus=4)\n  Sending NMI from CPU 0 to CPUs 1:\n  rcu: rcu_preempt kthread starved for 2495 jiffies! g1197 f0x0 RCU_GP_DOING_FQS(6) -\u003estate=0x0 -\u003ecpu=2\n  rcu:     Unless rcu_preempt kthread gets sufficient CPU time, OOM is now expected behavior.\n  rcu: RCU grace-period kthread stack dump:\n  task:rcu_preempt     state:I stack:0     pid:15    tgid:15    ppid:2      task_flags:0x208040 flags:0x00000800\n  Stack : 9000000100423e80 0000000000000402 0000000000000010 90000001003b0680\n          9000000085d88000 0000000000000000 0000000000000040 9000000087159350\n          9000000085c2b9b0 0000000000000001 900000008704a000 0000000000000005\n          00000000ffff355b 00000000ffff355b 0000000000000000 0000000000000004\n          9000000085d90510 0000000000000000 0000000000000002 7b5d998f8281e86e\n          00000000ffff355c 7b5d998f8281e86e 000000000000003f 9000000087159350\n          900000008715bf98 0000000000000005 9000000087036000 900000008704a000\n          9000000100407c98 90000001003aff80 900000008715c4c0 9000000085c2b9b0\n          00000000ffff355b 9000000085c33d3c 00000000000000b4 0000000000000000\n          9000000007002150 00000000ffff355b 9000000084615480 0000000007000002\n          ...\n  Call Trace:\n  [\u003c9000000085c2a868\u003e] __schedule+0x410/0x1520\n  [\u003c9000000085c2b9ac\u003e] schedule+0x34/0x190\n  [\u003c9000000085c33d38\u003e] schedule_timeout+0x98/0x140\n  [\u003c90000000845e9120\u003e] rcu_gp_fqs_loop+0x5f8/0x868\n  [\u003c90000000845ed538\u003e] rcu_gp_kthread+0x260/0x2e0\n  [\u003c900000008454e8a4\u003e] kthread+0x144/0x238\n  [\u003c9000000085c26b60\u003e] ret_from_kernel_thread+0x28/0xc8\n  [\u003c90000000844f20e4\u003e] ret_from_kernel_thread_asm+0xc/0x88\n\n  rcu: Stack dump where RCU GP kthread last ran:\n  Sending NMI from CPU 0 to CPUs 2:\n  NMI backtrace for cpu 2 skipped: idling at idle_exit+0x0/0x4\n\nReject it for now."
        }
      ],
      "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 - The vulnerable trampoline is emitted only through a local bpf() syscall that loads and attaches a tracing program to a function whose BTF prototype contains a by-value struct argument. Remote traffic may later execute the traced function, but cannot install the malformed trampoline.\nAC:L - The attacker chooses the target function, the attach type (fentry/fexit/fmod_ret), and when to invoke it; the register-slot miscount is a deterministic codegen defect with no race or attacker-independent precondition.\nPR:L - Loading tracing programs nominally requires CAP_BPF and CAP_PERFMON, but bpf_token_capable() evaluates these via ns_capable() against a delegated BPF token\u0027s user namespace, so a namespace-root user in a reasonable container deployment can reach this path without host root.\nUI:N - The attacker loads the program, attaches the trampoline, and triggers the traced kernel function entirely on its own; no other user needs to act.\nS:U - The malformed trampoline, the corrupted argument registers, and the resulting fault all remain within the host kernel\u0027s security authority, with no guest-to-host or IOMMU boundary crossed.\nC:H - The verifier sizes ctx for struct args expanded across multiple slots while the trampoline stored only nr_args slots, so the attached program legitimately reads past the args area into the trampoline frame \u2014 exposing the saved frame pointer and the saved kernel-text return address at FP-8 \u2014 and the traced function additionally reads through an uninitialized pointer argument.\nI:H - The traced kernel function executes with argument registers that were never saved and were clobbered by the trampoline\u0027s intervening calls, so a callee that stores through such an argument pointer writes to an uncontrolled kernel address, corrupting kernel memory and function state.\nA:H - The reported failure is an unhandled kernel paging request in the traced function followed by RCU grace-period stalls and a CPU lockup, and the attacker can re-trigger it at will by invoking the traced function."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T12:08:05.901Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/d1158559315143e11bfaabcd4b2bea98c7ed1be9"
        },
        {
          "url": "https://git.kernel.org/stable/c/e82406c7cbdd368c5459b8a45e118811d2ba0794"
        }
      ],
      "title": "LoongArch: BPF: No support of struct argument in trampoline programs",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-40151",
    "datePublished": "2025-11-12T10:23:27.662Z",
    "dateReserved": "2025-04-16T07:20:57.176Z",
    "dateUpdated": "2026-08-05T12:08:05.901Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2025-40151",
      "date": "2026-08-11",
      "epss": "0.00143",
      "percentile": "0.04052"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2025-40151\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-11-12T11:15:45.033\",\"lastModified\":\"2026-07-30T06:24:13.977\",\"vulnStatus\":\"Deferred\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nLoongArch: BPF: No support of struct argument in trampoline programs\\n\\nThe current implementation does not support struct argument. This causes\\na oops when running bpf selftest:\\n\\n  $ ./test_progs -a tracing_struct\\n  Oops[#1]:\\n  CPU -1 Unable to handle kernel paging request at virtual address 0000000000000018, era == 9000000085bef268, ra == 90000000844f3938\\n  rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:\\n  rcu:     1-...0: (19 ticks this GP) idle=1094/1/0x4000000000000000 softirq=1380/1382 fqs=801\\n  rcu:     (detected by 0, t=5252 jiffies, g=1197, q=52 ncpus=4)\\n  Sending NMI from CPU 0 to CPUs 1:\\n  rcu: rcu_preempt kthread starved for 2495 jiffies! g1197 f0x0 RCU_GP_DOING_FQS(6) -\u003estate=0x0 -\u003ecpu=2\\n  rcu:     Unless rcu_preempt kthread gets sufficient CPU time, OOM is now expected behavior.\\n  rcu: RCU grace-period kthread stack dump:\\n  task:rcu_preempt     state:I stack:0     pid:15    tgid:15    ppid:2      task_flags:0x208040 flags:0x00000800\\n  Stack : 9000000100423e80 0000000000000402 0000000000000010 90000001003b0680\\n          9000000085d88000 0000000000000000 0000000000000040 9000000087159350\\n          9000000085c2b9b0 0000000000000001 900000008704a000 0000000000000005\\n          00000000ffff355b 00000000ffff355b 0000000000000000 0000000000000004\\n          9000000085d90510 0000000000000000 0000000000000002 7b5d998f8281e86e\\n          00000000ffff355c 7b5d998f8281e86e 000000000000003f 9000000087159350\\n          900000008715bf98 0000000000000005 9000000087036000 900000008704a000\\n          9000000100407c98 90000001003aff80 900000008715c4c0 9000000085c2b9b0\\n          00000000ffff355b 9000000085c33d3c 00000000000000b4 0000000000000000\\n          9000000007002150 00000000ffff355b 9000000084615480 0000000007000002\\n          ...\\n  Call Trace:\\n  [\u003c9000000085c2a868\u003e] __schedule+0x410/0x1520\\n  [\u003c9000000085c2b9ac\u003e] schedule+0x34/0x190\\n  [\u003c9000000085c33d38\u003e] schedule_timeout+0x98/0x140\\n  [\u003c90000000845e9120\u003e] rcu_gp_fqs_loop+0x5f8/0x868\\n  [\u003c90000000845ed538\u003e] rcu_gp_kthread+0x260/0x2e0\\n  [\u003c900000008454e8a4\u003e] kthread+0x144/0x238\\n  [\u003c9000000085c26b60\u003e] ret_from_kernel_thread+0x28/0xc8\\n  [\u003c90000000844f20e4\u003e] ret_from_kernel_thread_asm+0xc/0x88\\n\\n  rcu: Stack dump where RCU GP kthread last ran:\\n  Sending NMI from CPU 0 to CPUs 2:\\n  NMI backtrace for cpu 2 skipped: idling at idle_exit+0x0/0x4\\n\\nReject it for now.\"}],\"affected\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"affectedData\":[{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"unaffected\",\"programFiles\":[\"arch/loongarch/net/bpf_jit.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"f9b6b41f0cf31791541cea9644ddbedb46465801\",\"lessThan\":\"d1158559315143e11bfaabcd4b2bea98c7ed1be9\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"f9b6b41f0cf31791541cea9644ddbedb46465801\",\"lessThan\":\"e82406c7cbdd368c5459b8a45e118811d2ba0794\",\"versionType\":\"git\",\"status\":\"affected\"}]},{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"affected\",\"programFiles\":[\"arch/loongarch/net/bpf_jit.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"6.17\",\"status\":\"affected\"},{\"version\":\"0\",\"lessThan\":\"6.17\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.17.3\",\"lessThanOrEqual\":\"6.17.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.18\",\"lessThanOrEqual\":\"*\",\"versionType\":\"original_commit_for_fix\",\"status\":\"unaffected\"}]}]}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"type\":\"Secondary\",\"cvssData\":{\"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\",\"attackVector\":\"LOCAL\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"HIGH\",\"integrityImpact\":\"HIGH\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":1.8,\"impactScore\":5.9}]},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/d1158559315143e11bfaabcd4b2bea98c7ed1be9\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/e82406c7cbdd368c5459b8a45e118811d2ba0794\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}",
    "redhat_vex": {
      "aggregate_severity": "None",
      "current_release_date": "2026-06-30T10:15:11+00:00",
      "cve": "CVE-2025-40151",
      "id": "CVE-2025-40151",
      "initial_release_date": "2025-11-12T00:00:00+00:00",
      "product_status:known_not_affected": "274",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: LoongArch: BPF: No support of struct argument in trampoline programs",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-40151.json",
      "version": "3"
    },
    "suse_vex": {
      "aggregate_severity": "moderate",
      "current_release_date": "2026-07-31T01:03:16Z",
      "cve": "CVE-2025-40151",
      "id": "CVE-2025-40151",
      "initial_release_date": "2025-11-14T00:24:53Z",
      "product_status:known_not_affected": "408",
      "source": "SUSE CSAF VEX",
      "status": "interim",
      "title": "SUSE CVE CVE-2025-40151",
      "url": "https://ftp.suse.com/pub/projects/security/csaf-vex/cve-2025-40151.json",
      "version": "6"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

Loading…